diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 02:24:12 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 02:24:12 +0000 |
commit | c22cd46d7b5589e19cb5da080663c2244596952c (patch) | |
tree | 93c3c879366a8259af156ac7961fb24a97b3f27c /bootstraptest | |
parent | 65bf52a32b369a40db9dd8d91dcada0638525fda (diff) | |
download | ruby-c22cd46d7b5589e19cb5da080663c2244596952c.tar.gz ruby-c22cd46d7b5589e19cb5da080663c2244596952c.tar.xz ruby-c22cd46d7b5589e19cb5da080663c2244596952c.zip |
* compile.c (iseq_compile_each): fix stack consistency error.
a patch from Yusuke ENDOH <mame AT tsg.ne.jp> [ruby-dev:32720]
* bootstraptest/test_syntax.rb: add 2 tests for above.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_syntax.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 4be2f0cdd..8d87ab990 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -690,3 +690,25 @@ assert_equal 'ok', %q{ end :ok } + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + redo + end + :ok +} + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + "#{ redo }" + end + :ok +} |