summaryrefslogtreecommitdiff
path: root/test/ruby/test_exception.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r--test/ruby/test_exception.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 17492706ed..a39e2c7723 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -104,7 +104,16 @@ class TestException < Test::Unit::TestCase
end
false
})
+ end
+ def test_catch_throw_in_require
+ bug7185 = '[ruby-dev:46234]'
+ t = Tempfile.open(["dep", ".rb"])
+ t.puts("throw :extdep, 42")
+ t.close
+ assert_equal(42, catch(:extdep) {require t.path}, bug7185)
+ ensure
+ t.close! if t
end
def test_else_no_exception