From 720cfb3e6041746bc064924e900f8c26dd5626b0 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 30 Oct 2006 02:24:08 +0000 Subject: * 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 --- sprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sprintf.c') diff --git a/sprintf.c b/sprintf.c index c29b9f9780..26142dea51 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) { -- cgit v1.2.3