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); }