summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-31 02:30:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-31 02:30:46 +0000
commit18caf715c94bf0d95cb0fa3425653179f74f8497 (patch)
tree4128c0f638cda3d64fe17544b548eaafd7fad7af
parent8a6c699282f975faff73d9e3bbf4d45af6fd8935 (diff)
* ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no
effect unless debug mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/syck/rubyext.c4
2 files changed, 8 insertions, 1 deletions
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 <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* 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 );