summaryrefslogtreecommitdiff
path: root/test/ruby/test_rational.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r--test/ruby/test_rational.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index 07d0ae5688e..1fa9ebe8651 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -939,4 +939,13 @@ class Rational_Test < Test::Unit::TestCase
def test_known_bug
end
+ def test_finite_p
+ assert_predicate(1/2r, :finite?)
+ assert_predicate(-1/2r, :finite?)
+ end
+
+ def test_infinite_p
+ assert_nil((1/2r).infinite?)
+ assert_nil((-1/2r).infinite?)
+ end
end