diff options
author | John Bachir <[email protected]> | 2021-09-24 23:15:52 +0100 |
---|---|---|
committer | git <[email protected]> | 2021-09-28 06:05:50 +0900 |
commit | 1147136b8a2fd40b2c2a60c00aa47ad514dd934e (patch) | |
tree | b2db6ca27e5eb14fc8c59c205d58ee1451a14470 /test/test_timeout.rb | |
parent | a60bf6f9bfbfe4248cbe6792d70fe029357b3d86 (diff) |
[ruby/timeout] test that yield is given number of seconds
https://github.com/ruby/timeout/commit/ec5a614334
Diffstat (limited to 'test/test_timeout.rb')
-rw-r--r-- | test/test_timeout.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb index 1caea185cb..74b65f119d 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -10,6 +10,10 @@ class TestTimeout < Test::Unit::TestCase end end + def test_yield_param + assert_equal [5, :ok], Timeout.timeout(5){|s| [s, :ok] } + end + def test_queue q = Thread::Queue.new assert_raise(Timeout::Error, "[ruby-dev:32935]") { |