mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* sprintf.c (rb_str_format): always trim preceding zeros.
[ruby-dev:32351] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cbd72b86da
commit
35adbb5f88
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Nov 26 18:38:00 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* sprintf.c (rb_str_format): always trim preceding zeros.
|
||||||
|
[ruby-dev:32351]
|
||||||
|
|
||||||
Mon Nov 26 17:32:16 2007 Tanaka Akira <akr@fsij.org>
|
Mon Nov 26 17:32:16 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* re.c (Init_Regexp): new method Regexp#fixed_encoding?
|
* re.c (Init_Regexp): new method Regexp#fixed_encoding?
|
||||||
|
|
|
@ -662,7 +662,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
|
||||||
val = rb_big_clone(val);
|
val = rb_big_clone(val);
|
||||||
rb_big_2comp(val);
|
rb_big_2comp(val);
|
||||||
}
|
}
|
||||||
tmp1 = tmp = rb_big2str0(val, base, RBIGNUM_SIGN(val));
|
tmp1 = tmp = rb_big2str0(val, base, Qtrue);
|
||||||
s = RSTRING_PTR(tmp);
|
s = RSTRING_PTR(tmp);
|
||||||
if (*s == '-') {
|
if (*s == '-') {
|
||||||
if (base == 10) {
|
if (base == 10) {
|
||||||
|
|
Loading…
Reference in a new issue