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

ruby-changes:8879

From: yugui <ko1@a...>
Date: Sun, 30 Nov 2008 18:25:11 +0900 (JST)
Subject: [ruby-changes:8879] Ruby:r20414 (ruby_1_9_1): merges r20356 from trunk into ruby_1_9_1.

yugui	2008-11-30 18:23:35 +0900 (Sun, 30 Nov 2008)

  New Revision: 20414

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

  Log:
    merges r20356 from trunk into ruby_1_9_1.
    * array.c (rb_ary_times): taint (and untrust) status should be
      inherited by "ary * 0".  [ruby-dev:37024]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/array.c

Index: ruby_1_9_1/array.c
===================================================================
--- ruby_1_9_1/array.c	(revision 20413)
+++ ruby_1_9_1/array.c	(revision 20414)
@@ -2551,7 +2551,10 @@
     }
 
     len = NUM2LONG(times);
-    if (len == 0) return ary_new(rb_obj_class(ary), 0);
+    if (len == 0) {
+	ary2 = ary_new(rb_obj_class(ary), 0);
+	goto out;
+    }
     if (len < 0) {
 	rb_raise(rb_eArgError, "negative argument");
     }
@@ -2566,6 +2569,7 @@
     for (i=0; i<len; i+=RARRAY_LEN(ary)) {
 	MEMCPY(RARRAY_PTR(ary2)+i, RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
     }
+  out:
     OBJ_INFECT(ary2, ary);
 
     return ary2;
Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 20413)
+++ ruby_1_9_1/ChangeLog	(revision 20414)
@@ -1,3 +1,8 @@
+Tue Nov 25 16:26:12 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* array.c (rb_ary_times): taint (and untrust) status should be
+	  inherited by "ary * 0".  [ruby-dev:37024]
+
 Tue Nov 25 15:54:07 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* strftime.c (rb_strftime): should not swallow incomplete

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

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