aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_float.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-07 07:03:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-07 07:03:53 +0000
commita3286ba320deabfd60861eabaddbc0263cb429f8 (patch)
tree8b269ced91ef4c389503bdb636340a36bff16445 /test/ruby/test_float.rb
parent172d8f9b6eb3d0af7f451e505fd3a5c2e438215e (diff)
downloadruby-a3286ba320deabfd60861eabaddbc0263cb429f8.tar.gz
Suppress warning: Bignum out of Float range
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r--test/ruby/test_float.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index 288101f129..f011c2b062 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -155,10 +155,12 @@ class TestFloat < Test::Unit::TestCase
assert_equal(31.0*2**1019, Float("0x0."+("0"*600)+"1fp3427"))
assert_equal(-31.0*2**1019, Float("-0x0."+("0"*268)+"1fp2099"))
assert_equal(-31.0*2**1019, Float("-0x0."+("0"*600)+"1fp3427"))
- assert_equal(31.0*2**-1027, Float("0x1f"+("0"*268)+".0p-2099"))
- assert_equal(31.0*2**-1027, Float("0x1f"+("0"*600)+".0p-3427"))
- assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*268)+".0p-2099"))
- assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427"))
+ suppress_warning do
+ assert_equal(31.0*2**-1027, Float("0x1f"+("0"*268)+".0p-2099"))
+ assert_equal(31.0*2**-1027, Float("0x1f"+("0"*600)+".0p-3427"))
+ assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*268)+".0p-2099"))
+ assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427"))
+ end
end
def test_divmod