From 1af43d329fe797e4ac74feeff95c742eb7953338 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 25 Dec 2007 02:24:12 +0000 Subject: * compile.c (iseq_compile_each): fix stack consistency error. a patch from Yusuke ENDOH [ruby-dev:32720] * bootstraptest/test_syntax.rb: add 2 tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_syntax.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bootstraptest/test_syntax.rb') diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 4be2f0cddb..8d87ab990b 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 +} -- cgit v1.2.3