diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 19:48:32 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 19:48:32 +0000 |
commit | 7cb010e3a5b7744dc4b8af71b1487ec500927542 (patch) | |
tree | cc1237286cfa03514895b7decc4125bc933c1d4a /test/ruby/test_bignum.rb | |
parent | 15689ed7780b06ddc14cde4f427de834177283a5 (diff) |
Handle exception explicitly in TestBignum#test_interrupt_during_to_s
* Otherwise it produces a warning with Thread.report_on_exception=true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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) |