summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 14:03:38 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 14:03:38 +0000
commit19c818ca5727f93476bea7ac46340956d76e611c (patch)
treecf2b669faf951f5f26d2f7dfc76f24cf9baf74c4
parent50ba0ce29ea2b09bc2975357b7e40706bb9f4194 (diff)
* string.c (rb_str_format_m): make tmp volatile to avoid possible GC
problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0722190fae..4f53e99e44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 29 23:01:54 2008 Tanaka Akira <[email protected]>
+
+ * string.c (rb_str_format_m): make tmp volatile to avoid possible GC
+ problem.
+
Sun Jun 29 19:19:42 2008 Nobuyoshi Nakada <[email protected]>
* array.c (rb_ary_fill): check for negative length.
diff --git a/string.c b/string.c
index 4f0517938f..615af97e67 100644
--- a/string.c
+++ b/string.c
@@ -462,7 +462,7 @@ static VALUE
rb_str_format_m(str, arg)
VALUE str, arg;
{
- VALUE tmp = rb_check_array_type(arg);
+ volatile VALUE tmp = rb_check_array_type(arg);
if (!NIL_P(tmp)) {
return rb_str_format(RARRAY_LEN(tmp), RARRAY_PTR(tmp), str);