diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-26 08:44:43 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-26 08:44:43 +0000 |
commit | 521590b86ea31e0ebf25cdabf641c9321b7e0f00 (patch) | |
tree | f2b31fb51cd0a095868a0bd647100f39a123064a /compile.c | |
parent | f5b53613764e2d7ef226939c78bc7d71cc40706d (diff) | |
download | ruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.tar.gz ruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.tar.xz ruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.zip |
* compile.c (iseq_compile_each): validate argument expr of "next"
statement.
* bootstraptest/test_syntax.rb: add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3044,6 +3044,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) LABEL *splabel = NEW_LABEL(0); debugs("next in while loop\n"); ADD_LABEL(ret, splabel); + COMPILE(ret, "next val/valid syntax?", node->nd_stts); add_ensure_iseq(ret, iseq); ADD_ADJUST(ret, nd_line(node), iseq->compile_data->redo_label); ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->start_label); |