ruby-changes:51055
From: nobu <ko1@a...>
Date: Thu, 26 Apr 2018 09:12:41 +0900 (JST)
Subject: [ruby-changes:51055] nobu:r63261 (trunk): test_numeric.rb: loose precision assertion
nobu 2018-04-26 09:12:35 +0900 (Thu, 26 Apr 2018) New Revision: 63261 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63261 Log: test_numeric.rb: loose precision assertion * test/ruby/test_numeric.rb (TestNumeric#test_step): remove a loose precision assertion, as Float cannot keep complete precision. [ruby-core:86684] [Bug #14712] Modified files: trunk/test/ruby/test_numeric.rb Index: test/ruby/test_numeric.rb =================================================================== --- test/ruby/test_numeric.rb (revision 63260) +++ test/ruby/test_numeric.rb (revision 63261) @@ -289,7 +289,6 @@ class TestNumeric < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_numeric.rb#L289 i <<= 1 until (bigflo - i).to_i < bignum bigflo -= i >> 1 assert_equal(bigflo.to_i, (0.0).step(bigflo-1.0, 1.0).size) - assert_operator((0.0).step(bignum.to_f, 1.0).size, :>=, bignum) # may loose precision assert_step [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 10] assert_step [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, to: 10] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/