From bc162c69ea86378d6c0f649f2fecbf1a38bdddfb Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 20 Dec 2007 00:50:13 +0000 Subject: [PATCH] * bootstraptest/test_syntax.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bootstraptest/test_syntax.rb | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index b783f8fc29..0f6e457618 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 20 09:47:58 2007 Koichi Sasada + + * bootstraptest/test_syntax.rb: add a test. + Thu Dec 20 09:40:51 2007 Koichi Sasada * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency. diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index e407d7cf5f..37b07b0c15 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -644,5 +644,21 @@ assert_equal 'true', %q{ assert_normal_exit %q{ eval "while true; return; end rescue p $!" }, '[ruby-dev:31663]' +assert_equal :ok, %q{ + def bar + raise + end + def foo + 1.times{ + begin + return bar + rescue + :ok + end + } + end + + foo +}