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

ruby-changes:4797

From: ko1@a...
Date: Mon, 5 May 2008 11:40:34 +0900 (JST)
Subject: [ruby-changes:4797] matz - Ruby:r16291 (trunk): * array.c (rb_ary_dup): should dupe corresponding information.

matz	2008-05-05 11:40:13 +0900 (Mon, 05 May 2008)

  New Revision: 16291

  Modified files:
    trunk/ChangeLog
    trunk/array.c

  Log:
    * array.c (rb_ary_dup): should dupe corresponding information.
      [ruby-dev:34581]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/array.c?r1=16291&r2=16290&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16291&r2=16290&diff_format=u

Index: array.c
===================================================================
--- array.c	(revision 16290)
+++ array.c	(revision 16291)
@@ -1229,9 +1229,9 @@
 {
     VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
 
+    DUPSETUP(dup, ary);
     MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
     RARRAY(dup)->len = RARRAY_LEN(ary);
-    OBJ_INFECT(dup, ary);
 
     return dup;
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16290)
+++ ChangeLog	(revision 16291)
@@ -1,3 +1,8 @@
+Mon May  5 11:36:14 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* array.c (rb_ary_dup): should dupe corresponding information.
+	  [ruby-dev:34581]
+
 Mon May  5 11:13:50 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* compile.c (compile_cpath): use Qundef to denote cbase lookup.

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

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