diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-12 15:09:50 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-12 15:09:50 +0000 |
commit | b525710be4dbfe8f725410787d977e97b103393e (patch) | |
tree | 3e6ea625deb823481c2ec16ed969ff9d02bfe945 /sprintf.c | |
parent | f58c42d35776b2818474b59cbe109d180705b56d (diff) |
* sprintf.c (rb_str_format): fix a GC problem.
[ruby-dev:28001]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -454,6 +454,7 @@ rb_f_sprintf(argc, argv) int base, bignum = 0; int len, pos; VALUE tmp; + volatile VALUE tmp1; switch (*p) { case 'd': @@ -602,7 +603,7 @@ rb_f_sprintf(argc, argv) 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) { |