diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-22 03:51:11 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-22 03:51:11 +0000 |
commit | 60c29bbbf6574e0e947c56e71c3c3ca11620ee15 (patch) | |
tree | 00b520a8985d7437d3b567dd7dd14b70d89747a6 /test | |
parent | b8a95c0f4a42afea2948e76d1ad23acea42be5bd (diff) |
merge revision(s) 43775:
* 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/branches/ruby_1_9_3@43776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_float.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index d2cee75433..301aeecf0f 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -519,4 +519,16 @@ class TestFloat < Test::Unit::TestCase sleep(0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1) end end + + def test_long_string + assert_normal_exit(<<-'end;') + assert_in_epsilon(10.0, ("1."+"1"*300000).to_f*9) + end; + end + + def test_long_string + assert_normal_exit(<<-'end;') + assert_in_epsilon(10.0, ("1."+"1"*300000).to_f*9) + end; + end end |