From 46cd2f463c5668f53436076e67db59fdc33ff384 Mon Sep 17 00:00:00 2001 From: nagachika Date: Fri, 22 Nov 2013 04:00:39 +0000 Subject: 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_2_0_0@43778 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 f011c2b062..e9b18f2e57 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