From 105e00bdd797fa6699919e3d34edf57428be3c6e Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 24 Dec 2007 17:41:29 +0000 Subject: * 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 --- bootstraptest/test_knownbug.rb | 9 --------- bootstraptest/test_syntax.rb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'bootstraptest') diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index eebd299340..39dc6a9b8b 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -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]' diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index e06db6bf4a..5fd948cdff 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -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]' + -- cgit v1.2.3