diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 2d84ee3a6d..921f5a01c1 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -234,6 +234,13 @@ class TestThread < Test::Unit::TestCase t = Thread.new {} assert_same t, t.join(limit), "limit=#{limit.inspect}" end + t = Thread.new { sleep } + [ -1, -0.1, RbConfig::LIMITS['FIXNUM_MIN'], RbConfig::LIMITS['INT64_MIN'], + -Float::INFINITY + ].each do |limit| + assert_nil t.join(limit), "limit=#{limit.inspect}" + end + t.kill end def test_kill_main_thread |