ruby-changes:3137
From: ko1@a...
Date: 25 Dec 2007 03:55:09 +0900
Subject: [ruby-changes:3137] ko1 - Ruby:r14629 (trunk): * compile.c (iseq_compile_each): fix stack consistency bug.
ko1 2007-12-25 03:54:52 +0900 (Tue, 25 Dec 2007) New Revision: 14629 Modified files: trunk/ChangeLog trunk/bootstraptest/test_syntax.rb trunk/compile.c Log: * compile.c (iseq_compile_each): fix stack consistency bug. a patch from Yusuke ENDOH <mame AT tsg.ne.jp> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=14629&r2=14628 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14629&r2=14628 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_syntax.rb?r1=14629&r2=14628 Index: ChangeLog =================================================================== --- ChangeLog (revision 14628) +++ ChangeLog (revision 14629) @@ -1,3 +1,8 @@ +Tue Dec 25 03:51:55 2007 Koichi Sasada <ko1@a...> + + * compile.c (iseq_compile_each): fix stack consistency bug. + a patch from Yusuke ENDOH <mame AT tsg.ne.jp> + Tue Dec 25 03:19:47 2007 WATANABE Hirofumi <eban@r...> * tool/make-snapshot: must create configure and lex.c. Index: bootstraptest/test_syntax.rb =================================================================== --- bootstraptest/test_syntax.rb (revision 14628) +++ bootstraptest/test_syntax.rb (revision 14629) @@ -681,3 +681,12 @@ end # direct }, '[ruby-core:14385]' +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + "#{next}" + end + :ok +} Index: compile.c =================================================================== --- compile.c (revision 14628) +++ compile.c (revision 14629) @@ -2973,7 +2973,7 @@ if (iseq->compile_data->redo_label != 0) { /* next in while loop */ debugs("next in while\n"); - pop_after_throw = 1; + pop_after_throw = poped; goto next_by_throw; } else if (iseq->compile_data->end_label) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml