diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 09:58:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 09:58:09 +0000 |
commit | dcb13f8e17f646d1878a691130b3428c25564d29 (patch) | |
tree | 9275a800c9ee8d164ce56372e223f3ba18ad4676 | |
parent | 23f9ffbf35f79fcfb57dddb8331440d857a46b22 (diff) |
* lib/timeout.rb (Timeout#timeout): propagate errors to the
caller. [ruby-dev:41010]'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/test_timeout.rb | 6 |
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 |