diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-31 10:51:55 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-31 10:51:55 +0000 |
commit | f0a0909fbc3c3f29917e106e602ff5b66ba59e78 (patch) | |
tree | cbca9e6084585b57b1aacb67837b8350fd18c897 /test | |
parent | 4c2f9198197ead6da0c87d8bff518e78fd3a36d4 (diff) |
Fixed [Bug #14731]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@66963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_float.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index d873461de1..f76d62bd0b 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -164,6 +164,8 @@ class TestFloat < Test::Unit::TestCase assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427")) end + assert_equal(1.0e10, Float("1.0_"+"00000"*Float::DIG+"e10")) + z = "0" * (Float::DIG * 4 + 10) ["long invalid string", "1.0", "1.0e", "1.0e-", "1.0e+"].each do |n| assert_raise(ArgumentError, n += z + "A") {Float(n)} |