From 5cb83d9dab13e14e6146f455ffd9fed4254d238f Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Nov 2013 03:43:56 +0000 Subject: 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 --- test/ruby/test_float.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/test_float.rb') 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 -- cgit v1.2.3