summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_timeout.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb
index 9ec9c02a93..57eca3e478 100644
--- a/test/test_timeout.rb
+++ b/test/test_timeout.rb
@@ -23,4 +23,10 @@ class TestTimeout < Test::Unit::TestCase
end
assert !@flag, "[ruby-dev:38319]"
end
+
+ def test_cannot_convert_into_time_interval
+ bug3168 = '[ruby-dev:41010]'
+ def (n = Object.new).zero?; false; end
+ assert_raise(TypeError, bug3168) {Timeout.timeout(n) { sleep 0.1 }}
+ end
end