From 646988189a1e3768ac9247de84f32b6460b2cfbb Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 5 May 2008 02:40:13 +0000 Subject: [PATCH] * array.c (rb_ary_dup): should dupe corresponding information. [ruby-dev:34581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ array.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 + + * array.c (rb_ary_dup): should dupe corresponding information. + [ruby-dev:34581] + Mon May 5 11:13:50 2008 Yukihiro Matsumoto * 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; }