From 14c3aa52aeff4fed170b3dbe8666aaa851b654d2 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 14 Aug 2007 10:53:53 +0000 Subject: * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move init place of exception_error. * inits.c: ditto. * eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL. [ruby-dev:31407] * bootstraptest/test_exception.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_exception.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bootstraptest/test_exception.rb') diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb index 79d7388b24..85ed946780 100644 --- a/bootstraptest/test_exception.rb +++ b/bootstraptest/test_exception.rb @@ -368,3 +368,26 @@ assert_equal %q{}, %q{ end end.call } + +## +assert_equal "ok", %q{ + $foo = "ok" + class C + def inspect + bar {} + $foo = "ng" + end + + def bar + raise + ensure + end + end + + begin + C.new.foo + rescue NoMethodError => e + $foo + end +}, "[ruby-dev:31407]" + -- cgit v1.2.3