diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-30 03:39:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-30 03:39:44 +0000 |
commit | 6e62aeb9bc0a1abf50e107a909370ef461d157f5 (patch) | |
tree | 528f87060a2e91eb90f75a5fd43e734ecf0c92e4 /sprintf.c | |
parent | ab984108d7f37ecd70e7d51b819a2f996d3ec834 (diff) | |
download | ruby-6e62aeb9bc0a1abf50e107a909370ef461d157f5.tar.gz |
* 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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |