1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* sprintf.c (rb_str_format): fix a GC problem.

[ruby-dev:28001]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2005-12-12 15:09:50 +00:00
parent 2a0604d7b8
commit 2da40f048e
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Dec 13 00:08:09 2005 Tanaka Akira <akr@m17n.org>
* sprintf.c (rb_str_format): fix a GC problem.
[ruby-dev:28001]
Mon Dec 12 15:51:22 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* test/openssl/test_ssl.rb (test_parallel): call GC.start to close

View file

@ -604,11 +604,12 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
}
}
else {
volatile VALUE tmp1;
if (!RBIGNUM(val)->sign) {
val = rb_big_clone(val);
rb_big_2comp(val);
}
tmp = rb_big2str(val, base);
tmp1 = tmp = rb_big2str(val, base);
s = RSTRING(tmp)->ptr;
if (*s == '-') {
if (base == 10) {