summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 19:48:32 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 19:48:32 +0000
commit7cb010e3a5b7744dc4b8af71b1487ec500927542 (patch)
treecc1237286cfa03514895b7decc4125bc933c1d4a /test
parent15689ed7780b06ddc14cde4f427de834177283a5 (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')
-rw-r--r--test/ruby/test_bignum.rb8
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)