diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 06:37:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 06:37:13 +0000 |
commit | 1f24a436c3855c9173da07263ed209eaeb71a136 (patch) | |
tree | 0264f52bb439d78f7b4100d528bdf5d84ca7186f /test | |
parent | 27da0b89827a105cf718663a87bc088f03396505 (diff) |
* numeric.c (flo_to_s): make minimum string representation.
[ruby-core:30145]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 |