diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_exception.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index f4174eee6e..281dc70fbe 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -92,7 +92,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 |