From ad9473d604eef2d342a5a12ebe7fdafe3260217c 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: http://svn.ruby-lang.org/repos/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_exception.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb index 79d7388b2..85ed94678 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