aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_timeout.rb')
-rw-r--r--test/test_timeout.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb
index 57eca3e478..4c6065c232 100644
--- a/test/test_timeout.rb
+++ b/test/test_timeout.rb
@@ -29,4 +29,18 @@ class TestTimeout < Test::Unit::TestCase
def (n = Object.new).zero?; false; end
assert_raise(TypeError, bug3168) {Timeout.timeout(n) { sleep 0.1 }}
end
+
+ def test_skip_rescue
+ bug8730 = '[Bug #8730]'
+ e = nil
+ assert_raise(Timeout::Error, bug8730) do
+ timeout 0.1 do
+ begin
+ sleep 3
+ rescue Exception => e
+ end
+ end
+ end
+ assert_nil(e, bug8730)
+ end
end