diff --git a/ChangeLog b/ChangeLog index ea8e3e3e3c..c5310a033f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Sep 19 10:47:03 2014 Nobuyoshi Nakada + + * test/ruby/test_math.rb (TestMath#assert_infinity): Float#finite? + returns true also for NaN, so use Float#infinite? instead. + [ruby-core:65117] [Feature #10261] + Fri Sep 19 05:36:16 2014 Eric Wong * NEWS: note --with-jemalloc option [ci skip] diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index 4d819d71a1..c4d0ff93f2 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -3,7 +3,7 @@ require 'test/unit' class TestMath < Test::Unit::TestCase def assert_infinity(a, *rest) rest = ["not infinity: #{a.inspect}"] if rest.empty? - assert_not_predicate(a, :finite?, *rest) + assert_predicate(a, :infinite?, *rest) end def assert_nan(a, *rest)