diff options
Diffstat (limited to 'bootstraptest/test_exception.rb')
-rw-r--r-- | bootstraptest/test_exception.rb | 23 |
1 files changed, 23 insertions, 0 deletions
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]" + |