diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-06 00:46:48 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-06 00:46:48 +0000 |
commit | 0ed5aee00074547ed58c55bef6d346a9a4dd4925 (patch) | |
tree | c9b1c4c1a6ffb58d759047c6ce284b28f71d524f /test/ruby/test_float.rb | |
parent | fab386fbff87a6fe3fa6d8521e0948b34be6a941 (diff) | |
download | ruby-0ed5aee00074547ed58c55bef6d346a9a4dd4925.tar.gz |
* util.c (ruby_strtod): check integr overflow.
[ruby-dev:42180] #3789
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r-- | test/ruby/test_float.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index e534ab294f..08ec63a6f9 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -448,6 +448,7 @@ class TestFloat < Test::Unit::TestCase assert_raise(ArgumentError) { Float("1.0\x001") } assert_equal(15.9375, Float('0xf.fp0')) assert_raise(ArgumentError) { Float('0xf.fp') } + assert_equal(Float::INFINITY, Float('0xf.fp1000000000000000')) assert_equal(1, suppress_warning {Float("1e10_00")}.infinite?) assert_raise(TypeError) { Float(nil) } o = Object.new |