diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-19 13:28:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-19 13:28:32 +0000 |
commit | 28dd61607e2e42cd568d8fff7304d406126bd2c3 (patch) | |
tree | 16d091f87b062696d4270e2140fb2cf3d72abc35 /test/ruby/test_sprintf.rb | |
parent | f587347c28cd7b9ea445ca8150cfdb62a761523b (diff) | |
download | ruby-28dd61607e2e42cd568d8fff7304d406126bd2c3.tar.gz |
sprintf.c: fix condition
* sprintf.c (rb_str_format): fix condition to round.
[ruby-core:64454] [Bug #10151]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_sprintf.rb')
-rw-r--r-- | test/ruby/test_sprintf.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb index 3cfb9ac7db..0b6bfb0c08 100644 --- a/test/ruby/test_sprintf.rb +++ b/test/ruby/test_sprintf.rb @@ -151,6 +151,7 @@ class TestSprintf < Test::Unit::TestCase def test_rational assert_match(/\A0\.10+\z/, sprintf("%.60f", 0.1r)) assert_match(/\A0\.3+\z/, sprintf("%.60f", 1/3r)) + assert_match(/\A1\.20+\z/, sprintf("%.60f", 1.2r)) end def test_hash |