diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-22 03:43:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-22 03:43:56 +0000 |
commit | 5cb83d9dab13e14e6146f455ffd9fed4254d238f (patch) | |
tree | 3a7be0c30c88bc002b7f725a3364de0da16d0af4 /test/ruby/test_float.rb | |
parent | e71bb2c54e2b98794e423b54c9a8e54695886a44 (diff) | |
download | ruby-5cb83d9dab13e14e6146f455ffd9fed4254d238f.tar.gz |
util.c: ignore too long fraction part
* util.c (ruby_strtod): ignore too long fraction part, which does not
affect the result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r-- | test/ruby/test_float.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 127c8c6f92..798185b44a 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -613,4 +613,10 @@ class TestFloat < Test::Unit::TestCase # always not flonum assert_raise(TypeError) { a = Float::INFINITY; def a.foo; end } end + + def test_long_string + assert_separately([], <<-'end;') + assert_in_epsilon(10.0, ("1."+"1"*300000).to_f*9) + end; + end end |