From 7cb010e3a5b7744dc4b8af71b1487ec500927542 Mon Sep 17 00:00:00 2001 From: eregon Date: Tue, 12 Dec 2017 19:48:32 +0000 Subject: 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 --- test/ruby/test_bignum.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') 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) -- cgit v1.2.3