summaryrefslogtreecommitdiff
path: root/test/ruby/test_bignum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r--test/ruby/test_bignum.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index 99c5952173..a0405ca274 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -103,4 +103,10 @@ class TestBignum < Test::Unit::TestCase
e = assert_raise(RangeError) {(1 << big).to_s}
assert_match(/too big to convert/, e.message)
end
+
+ def test_to_f
+ inf = 1 / 0.0
+ assert_equal(inf, (1 << 65536).to_f)
+ assert_equal(-inf, (-1 << 65536).to_f) # [ruby-core:30492] [Bug #3362]
+ end
end