aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
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;
}