summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 17:41:29 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 17:41:29 +0000
commit105e00bdd797fa6699919e3d34edf57428be3c6e (patch)
treef855ebba882f306972fc857b06ca12da09df3722 /compile.c
parentfda0ef6f04fb7cb164bb4409734a1506fd257d78 (diff)
* compile.c (iseq_compile_each): add a "pop" insn after break
to fix stack consistency error. [ruby-core:14385] * bootstraptest/test_syntax.rb: add tests for above. * bootstraptest/test_knownbug.rb: remove fixed bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index bc9e80cfdf..9f79c056fa 100644
--- a/compile.c
+++ b/compile.c
@@ -2928,6 +2928,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
iseq->compile_data->loopval_popped);
ADD_INSNL(ret, nd_line(node), jump,
iseq->compile_data->end_label);
+ ADD_INSN(ret, nd_line(node), pop);
}
else if (iseq->type == ISEQ_TYPE_BLOCK) {
break_by_insn: