mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* compile.c (iseq_compile_each): fix stack consistency error
(break is compiled to throw instead of jump insn). these problems are reported by Yusuke ENDOH <mame AT tsg.ne.jp> * bootstraptest/test_knownbug.rb, test_syntax.rb: move fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
904b278f94
commit
633df8de16
4 changed files with 64 additions and 28 deletions
|
@ -689,7 +689,7 @@ assert_equal 'ok', %q{
|
|||
"#{next}"
|
||||
end
|
||||
:ok
|
||||
}
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
counter = 2
|
||||
|
@ -700,7 +700,7 @@ assert_equal 'ok', %q{
|
|||
redo
|
||||
end
|
||||
:ok
|
||||
}
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
counter = 2
|
||||
|
@ -711,4 +711,38 @@ assert_equal 'ok', %q{
|
|||
"#{ redo }"
|
||||
end
|
||||
:ok
|
||||
}
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
assert_normal_exit %q{
|
||||
begin
|
||||
raise
|
||||
rescue
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
break if counter == 0
|
||||
next
|
||||
retry
|
||||
end
|
||||
end
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
assert_normal_exit %q{
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
break if counter == 0
|
||||
next
|
||||
"#{ break }"
|
||||
end
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
assert_normal_exit %q{
|
||||
counter = 2
|
||||
while true
|
||||
counter -= 1
|
||||
next if counter != 0
|
||||
"#{ break }"
|
||||
end
|
||||
}, 'reported by Yusuke ENDOH'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue