summaryrefslogtreecommitdiff
path: root/bootstraptest/test_exception.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-14 10:53:53 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-14 10:53:53 +0000
commit14c3aa52aeff4fed170b3dbe8666aaa851b654d2 (patch)
tree6f2a895bac75e382b9d4e71e1bb09f92cdafbc4b /bootstraptest/test_exception.rb
parent9cdeae9dad9f8ac8fe50b6b6f01ecd76f21f5e6b (diff)
* 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
Diffstat (limited to 'bootstraptest/test_exception.rb')
-rw-r--r--bootstraptest/test_exception.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb
index 79d7388..85ed946 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]"
+