[前][次][番号順一覧][スレッド一覧]

ruby-changes:30374

From: ko1 <ko1@a...>
Date: Thu, 8 Aug 2013 19:58:16 +0900 (JST)
Subject: [ruby-changes:30374] ko1:r42443 (trunk): * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of

ko1	2013-08-08 19:58:03 +0900 (Thu, 08 Aug 2013)

  New Revision: 42443

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42443

  Log:
    * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of
      RARRAY_PTR() because there is no new reference.

  Modified files:
    trunk/ChangeLog
    trunk/string.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42442)
+++ ChangeLog	(revision 42443)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug  8 19:56:52 2013  Koichi Sasada  <ko1@a...>
+
+	* 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  <ko1@a...>
 
 	* include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT.
Index: string.c
===================================================================
--- string.c	(revision 42442)
+++ string.c	(revision 42443)
@@ -1309,7 +1309,7 @@ rb_str_format_m(VALUE str, VALUE arg) https://github.com/ruby/ruby/blob/trunk/string.c#L1309
     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);
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]