diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-08 09:02:04 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-08 09:02:04 +0000 |
commit | f92f8b565f2e749c58f0998fdcf6f23d52096fe3 (patch) | |
tree | 23930e9fcf0451f76eaf9458eea8070fcff8ee38 /sprintf.c | |
parent | 5c9d3fac30ada76110bd0fcd31402e4bd979bb36 (diff) | |
download | ruby-f92f8b565f2e749c58f0998fdcf6f23d52096fe3.tar.gz |
* random.c (rb_f_rand): normalize bignum argument.
* sprintf.c (rb_f_sprintf): was decrementing width even if there
is no sign character.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -475,14 +475,16 @@ rb_f_sprintf(argc, argv) if (s[0] == '-') { s++; sc = '-'; + width--; } else if (flags & FPLUS) { sc = '+'; + width--; } else if (flags & FSPACE) { sc = ' '; + width--; } - width--; goto format_integer; } if (!RBIGNUM(val)->sign) { |