ruby-changes:49074
From: eregon <ko1@a...>
Date: Wed, 13 Dec 2017 04:48:37 +0900 (JST)
Subject: [ruby-changes:49074] eregon:r61189 (trunk): Handle exception explicitly in TestBignum#test_interrupt_during_to_s
eregon 2017-12-13 04:48:32 +0900 (Wed, 13 Dec 2017) New Revision: 61189 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61189 Log: Handle exception explicitly in TestBignum#test_interrupt_during_to_s * Otherwise it produces a warning with Thread.report_on_exception=true. Modified files: trunk/test/ruby/test_bignum.rb Index: test/ruby/test_bignum.rb =================================================================== --- test/ruby/test_bignum.rb (revision 61188) +++ test/ruby/test_bignum.rb (revision 61189) @@ -617,12 +617,14 @@ class TestBignum < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_bignum.rb#L617 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/