From e0932e3ad38a0740e65478bd85897db734980083 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 8 Aug 2013 10:58:03 +0000 Subject: [PATCH] * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of RARRAY_PTR() because there is no new reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 285dbd15ce..17c0a285a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 8 19:56:52 2013 Koichi Sasada + + * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of + RARRAY_PTR() because there is no new reference. + Thu Aug 8 19:55:51 2013 Koichi Sasada * include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT. diff --git a/string.c b/string.c index 81a368f4e5..2d328e45d5 100644 --- a/string.c +++ b/string.c @@ -1309,7 +1309,7 @@ rb_str_format_m(VALUE str, VALUE arg) volatile VALUE tmp = rb_check_array_type(arg); if (!NIL_P(tmp)) { - return rb_str_format(RARRAY_LENINT(tmp), RARRAY_PTR(tmp), str); + return rb_str_format(RARRAY_LENINT(tmp), RARRAY_RAWPTR(tmp), str); } return rb_str_format(1, &arg, str); }