diff options
Diffstat (limited to 'test/ruby/test_sprintf_comb.rb')
-rw-r--r-- | test/ruby/test_sprintf_comb.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_sprintf_comb.rb b/test/ruby/test_sprintf_comb.rb index 3105127046..261732bcbc 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 = '..' unless precision + sign = '..' else sign = '-' end @@ -222,8 +222,8 @@ class TestSprintfComb < Test::Unit::TestCase end end if type == 'o' && hs - if digits.empty? || digits.last != 0 - prefix = '0' + if digits.empty? || digits.last != d + digits << d end end |