summaryrefslogtreecommitdiff
path: root/test/ruby/test_math.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 01:47:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 01:47:06 +0000
commit5cd2d58396dbccda7b4187d60063bdc234acd861 (patch)
tree7ab1eefe7852e80267da28cdc00e6a915579917c /test/ruby/test_math.rb
parent8b9afe6520eddc81c7edb1328f1543e9df7fea2f (diff)
test_math.rb: use Float#infinite?
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r--test/ruby/test_math.rb2
1 files changed, 1 insertions, 1 deletions
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)