summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-30 02:24:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-30 02:24:08 +0000
commit720cfb3e6041746bc064924e900f8c26dd5626b0 (patch)
treeb29a36e3efcc00f7c4c2b71fda2df376462e70c0 /sprintf.c
parentaa1160ada856883c0bc3ca410efc7a5337bfc401 (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/branches/ruby_1_8@11236 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 c29b9f9..26142de 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -627,7 +627,7 @@ rb_f_sprintf(argc, argv)
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(tmp)->ptr;
if (*s == '-') {
if (base == 10) {