* sprintf.c (rb_str_format): prepend ".." to %u for negative bignum,
but not "-". fixed: [ruby-core:08167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
69be57eb57
commit
79c5eb1af3
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jul 26 17:28:16 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* sprintf.c (rb_str_format): prepend ".." to %u for negative bignum,
|
||||||
|
but not "-". fixed: [ruby-core:08167]
|
||||||
|
|
||||||
Wed Jul 26 16:39:07 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Jul 26 16:39:07 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_scan): add string modification check.
|
* string.c (rb_str_scan): add string modification check.
|
||||||
|
@ -625,7 +625,6 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
|
|||||||
if (base == 10) {
|
if (base == 10) {
|
||||||
rb_warning("negative number for %%u specifier");
|
rb_warning("negative number for %%u specifier");
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
remove_sign_bits(++s, base);
|
remove_sign_bits(++s, base);
|
||||||
tmp = rb_str_new(0, 3+strlen(s));
|
tmp = rb_str_new(0, 3+strlen(s));
|
||||||
t = RSTRING(tmp)->ptr;
|
t = RSTRING(tmp)->ptr;
|
||||||
@ -646,7 +645,6 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pos = -1;
|
pos = -1;
|
||||||
len = strlen(s);
|
len = strlen(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user