diff options
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r-- | test/ruby/test_bignum.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 3ead77766d..65d974005e 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -617,12 +617,14 @@ class TestBignum < Test::Unit::TestCase num = (65536 ** 65536) thread = Thread.new do start_flag = true - num.to_s - end_flag = true + assert_raise(RuntimeError) { + num.to_s + end_flag = true + } end sleep 0.001 until start_flag thread.raise - thread.join rescue nil + thread.join time = Time.now - time skip "too fast cpu" if end_flag assert_operator(time, :<, 10) |