From 15403c9b743bfdb246b0f1cc2ad91ed8e5fcbb24 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 29 Jun 2008 14:03:38 +0000 Subject: * string.c (rb_str_format_m): make tmp volatile to avoid possible GC problem. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 66de79ce9..92ae8ea1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 29 23:01:54 2008 Tanaka Akira + + * string.c (rb_str_format_m): make tmp volatile to avoid possible GC + problem. + Sun Jun 29 18:01:30 2008 Kouhei Sutou * lib/rss/parser.rb, lib/rss/utils.rb: merge documents from ruby_1_8. diff --git a/string.c b/string.c index 49f3ba945..983f3e682 100644 --- a/string.c +++ b/string.c @@ -957,7 +957,7 @@ rb_str_times(VALUE str, VALUE times) static VALUE rb_str_format_m(VALUE str, VALUE 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); -- cgit