diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 01:57:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 01:57:08 +0000 |
commit | 07b314f07b0fa45838474b4f8c7ef32c746c6536 (patch) | |
tree | f47c2cc29f174ceebdecb29c397e1f5d25a8ad7a /test/ruby/test_float.rb | |
parent | 7abe8a556028ba84757409bfad790b937fb0a839 (diff) | |
download | ruby-07b314f07b0fa45838474b4f8c7ef32c746c6536.tar.gz |
* numeric.c (flo_to_s): make minimum string representation.
[ruby-core:30145]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r-- | test/ruby/test_float.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index a0d72be03d..03d9c94766 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -136,6 +136,13 @@ class TestFloat < Test::Unit::TestCase assert_equal("NaN", (inf / inf).to_s) assert_equal("1.0e+18", 1000_00000_00000_00000.0.to_s) + + bug3273 = '[ruby-core:30145]' + [0.21611564636388508, 0.56].each do |f| + s = f.to_s + assert_equal(f, s.to_f, bug3273) + assert_not_equal(f, s.chop.to_f, bug3273) + end end def test_coerce |