diff options
| author | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-15 21:46:47 +0000 |
|---|---|---|
| committer | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-15 21:46:47 +0000 |
| commit | 108b729757dc7d080323a95c9066f3541698ba7b (patch) | |
| tree | 65ef3ad8b83ecd970f50ff2c9dc63ed354a0ee33 /ext/syck/rubyext.c | |
| parent | a3fb8f18c41b024a7ca0a06adf41d66566c2f7db (diff) | |
| download | ruby-108b729757dc7d080323a95c9066f3541698ba7b.tar.gz ruby-108b729757dc7d080323a95c9066f3541698ba7b.tar.xz ruby-108b729757dc7d080323a95c9066f3541698ba7b.zip | |
* lib/gram.c: fixes to one-line documents and end of stream documents.
* lib/syck.c, lib/syck.h: add root_on_error to parser struct, specifying
the symbol to be returned on a parse error.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/rubyext.c')
| -rw-r--r-- | ext/syck/rubyext.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index d8aeb5ecb..8b94636b4 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -446,6 +446,8 @@ syck_parser_new(argc, argv, class) rb_scan_args(argc, argv, "01", &options); pobj = Data_Wrap_Struct( class, 0, syck_free_parser, parser ); + syck_parser_set_root_on_error( parser, Qnil ); + if ( ! rb_obj_is_instance_of( options, rb_cHash ) ) { options = rb_hash_new(); |
