diff --git a/ChangeLog b/ChangeLog index 9120400c5a..168cc31cc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 31 11:30:42 2008 Nobuyoshi Nakada + + * ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no + effect unless debug mode. + Thu Jul 31 10:51:39 2008 Nobuyoshi Nakada * iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms which diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index c229f0d4dd..d5c6372076 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -113,7 +113,9 @@ rb_syck_compile(VALUE self, VALUE port) syck_parser_implicit_typing( parser, 0 ); syck_parser_taguri_expansion( parser, 0 ); oid = syck_parse( parser ); - ASSERT(syck_lookup_sym( parser, oid, &data )); + if (!syck_lookup_sym( parser, oid, &data )) { + rb_raise(rb_eSyntaxError, "root node <%lx> not found", oid); + } sav = data; ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 );