aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b38f3fec37..346d1e31e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 5 11:36:14 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * array.c (rb_ary_dup): should dupe corresponding information.
+ [ruby-dev:34581]
+
Mon May 5 11:13:50 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* compile.c (compile_cpath): use Qundef to denote cbase lookup.
diff --git a/array.c b/array.c
index 18bceeb7c3..3931798621 100644
--- a/array.c
+++ b/array.c
@@ -1229,9 +1229,9 @@ rb_ary_dup(VALUE ary)
{
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;
}