File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -786,15 +786,14 @@ def test_precs_deprecated
786786 end
787787
788788 def test_precs
789- assert_separately ( [ "-rbigdecimal" ] , "#{ <<~"begin;" } \n #{ <<~'end;' } " )
790- begin;
791- $VERBOSE = nil
792- a = BigDecimal("1").precs
793- assert_instance_of(Array, a)
794- assert_equal(2, a.size)
795- assert_kind_of(Integer, a[0])
796- assert_kind_of(Integer, a[1])
797- end;
789+ $VERBOSE, verbose = nil , $VERBOSE
790+ a = BigDecimal ( "1" ) . precs
791+ assert_instance_of ( Array , a )
792+ assert_equal ( 2 , a . size )
793+ assert_kind_of ( Integer , a [ 0 ] )
794+ assert_kind_of ( Integer , a [ 1 ] )
795+ ensure
796+ $VERBOSE = verbose
798797 end
799798
800799 def test_hash
Original file line number Diff line number Diff line change @@ -400,16 +400,14 @@ def test_log
400400 assert_converge_in_precision { |n | log ( BigDecimal ( "1e30" ) , n ) }
401401 assert_converge_in_precision { |n | log ( SQRT2 , n ) }
402402 assert_raise ( Math ::DomainError ) { log ( BigDecimal ( "-0.1" ) , 10 ) }
403- assert_separately ( %w[ -rbigdecimal ] , <<-SRC )
404403 begin
405- x = BigMath.log( BigDecimal("1E19999999999999"), 10 )
404+ x = BigDecimal ( "1E19999999999999" )
406405 rescue FloatDomainError
407406 else
408407 unless x . infinite?
409- assert_in_epsilon(Math.log(10)* 19999999999999, x )
408+ assert_in_epsilon ( Math . log ( 10 ) * 19999999999999 , BigMath . log ( x , 10 ) )
410409 end
411410 end
412- SRC
413411 end
414412
415413 def test_log2
You can’t perform that action at this time.
0 commit comments