aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_sprintf_comb.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-15 08:28:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-15 08:28:12 +0000
commita160986d90cf90a86e01d60eddb04ffe0e584c36 (patch)
tree5057fae6065134cb2195a5f9b824a55ed29987b4 /test/ruby/test_sprintf_comb.rb
parentccaf61d5aff59f5e11a772c4f9bd0d1c10232e25 (diff)
downloadruby-a160986d90cf90a86e01d60eddb04ffe0e584c36.tar.gz
* sprintf.c (rb_str_format): fix: sprintf with hex format and
precision includes wrong dots. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_sprintf_comb.rb')
-rw-r--r--test/ruby/test_sprintf_comb.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_sprintf_comb.rb b/test/ruby/test_sprintf_comb.rb
index 261732bcbc..3105127046 100644
--- a/test/ruby/test_sprintf_comb.rb
+++ b/test/ruby/test_sprintf_comb.rb
@@ -190,7 +190,7 @@ class TestSprintfComb < Test::Unit::TestCase
if digits.last != radix-1
digits << (radix-1)
end
- sign = '..'
+ sign = '..' unless precision
else
sign = '-'
end
@@ -222,8 +222,8 @@ class TestSprintfComb < Test::Unit::TestCase
end
end
if type == 'o' && hs
- if digits.empty? || digits.last != d
- digits << d
+ if digits.empty? || digits.last != 0
+ prefix = '0'
end
end