mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
fda0ef6f04
commit
105e00bdd7
4 changed files with 29 additions and 9 deletions
|
@ -1,3 +1,12 @@
|
|||
Tue Dec 25 02:15:39 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* 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.
|
||||
|
||||
Tue Dec 25 01:54:36 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* id.c (Init_id): remove several unused symbols. [ruby-core:14362]
|
||||
|
|
|
@ -2,12 +2,3 @@
|
|||
# This test file concludes tests which point out known bugs.
|
||||
# So all tests will cause failure.
|
||||
#
|
||||
|
||||
assert_normal_exit %q{
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
next if counter != 0
|
||||
break
|
||||
end
|
||||
}, '[ruby-core:14385]'
|
||||
|
|
|
@ -662,3 +662,22 @@ assert_equal '1', %q{
|
|||
foo
|
||||
}
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
next if counter != 0
|
||||
break
|
||||
end
|
||||
:ok
|
||||
}, '[ruby-core:14385]'
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
next if counter != 0
|
||||
break :ok
|
||||
end # direct
|
||||
}, '[ruby-core:14385]'
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue