diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 12:37:16 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 12:37:16 +0000 |
| commit | 52bb29144f80a0b2279e70a8ac7be323ed95c5c2 (patch) | |
| tree | 7f9889ab265a4dbf85c36ca259da1fb51a6db600 /bootstraptest | |
| parent | 4f89c13577242415cf76ce6267333075b54818cd (diff) | |
| download | ruby-52bb29144f80a0b2279e70a8ac7be323ed95c5c2.tar.gz ruby-52bb29144f80a0b2279e70a8ac7be323ed95c5c2.tar.xz ruby-52bb29144f80a0b2279e70a8ac7be323ed95c5c2.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@14699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_knownbug.rb | 24 | ||||
| -rw-r--r-- | bootstraptest/test_syntax.rb | 40 |
2 files changed, 37 insertions, 27 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 24e3c5483..39dc6a9b8 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -2,27 +2,3 @@ # This test file concludes tests which point out known bugs. # So all tests will cause failure. # - -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' diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 8d87ab990..ed47d5987 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -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' + |
