diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-02 13:37:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-02 13:37:18 +0000 |
commit | e6ecf24b3881053c8f7600b29c2a9c4b2311a904 (patch) | |
tree | 60eb8efb154cde513d19cbd0ba76701364b4ae53 /test/ruby | |
parent | 5af22885f87b5433f8a35e0e873297ac4a7b789c (diff) | |
download | ruby-e6ecf24b3881053c8f7600b29c2a9c4b2311a904.tar.gz |
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/trunk@63322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_float.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 24bed9269c..5686fd4617 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 |