summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-30 03:39:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-30 03:39:44 +0000
commit6e62aeb9bc0a1abf50e107a909370ef461d157f5 (patch)
tree528f87060a2e91eb90f75a5fd43e734ecf0c92e4 /sprintf.c
parentab984108d7f37ecd70e7d51b819a2f996d3ec834 (diff)
* sprintf.c (rb_str_format): should preserve leading zero
information for negative %b and %x. [ruby-talk:221347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sprintf.c b/sprintf.c
index 585db5b718..41661f1134 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -627,7 +627,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
val = rb_big_clone(val);
rb_big_2comp(val);
}
- tmp1 = tmp = rb_big2str(val, base);
+ tmp1 = tmp = rb_big2str0(val, base, RBIGNUM(val)->sign);
s = RSTRING_PTR(tmp);
if (*s == '-') {
if (base == 10) {