ruby-changes:6768
From: nobu <ko1@a...>
Date: Thu, 31 Jul 2008 11:30:59 +0900 (JST)
Subject: [ruby-changes:6768] Ruby:r18284 (trunk): * ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no
nobu 2008-07-31 11:30:46 +0900 (Thu, 31 Jul 2008) New Revision: 18284 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18284 Log: * ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no effect unless debug mode. Modified files: trunk/ChangeLog trunk/ext/syck/rubyext.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18283) +++ ChangeLog (revision 18284) @@ -1,3 +1,8 @@ +Thu Jul 31 11:30:42 2008 Nobuyoshi Nakada <nobu@r...> + + * 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 <nobu@r...> * iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms which Index: ext/syck/rubyext.c =================================================================== --- ext/syck/rubyext.c (revision 18283) +++ ext/syck/rubyext.c (revision 18284) @@ -113,7 +113,9 @@ 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 ); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/