summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-20 05:13:27 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-20 05:13:27 +0000
commit389c5843adf2c732b6a04560017544c63076f1b4 (patch)
treee458093752d98ac504af3a9c86991cfda90dfc93 /test
parentb5d43b1db567fd2ffee4407e31b85cead490e7a4 (diff)
merge revision(s) 63322: [Backport #14731]
object.c: fix exponent with underscore * object.c (rb_cstr_to_dbl_raise): do not ignore exponent part when the input string longer than internal buffer contains underscore(s). [ruby-core:86836] [Bug #14731] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@66879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index bddd10bf10..67432627d8 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -163,6 +163,8 @@ class TestFloat < Test::Unit::TestCase
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*268)+".0p-2099"))
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427"))
end
+
+ assert_equal(1.0e10, Float("1.0_"+"00000"*Float::DIG+"e10"))
end
def test_divmod