summaryrefslogtreecommitdiff
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 9bfd240..918dd12 100644
--- a/array.c
+++ b/array.c
@@ -732,7 +732,7 @@ rb_ary_dup(ary)
{
VALUE dup = rb_ary_new2(RARRAY(ary)->len);
- OBJSETUP(dup, rb_obj_type(ary), T_ARRAY);
+ OBJSETUP(dup, rb_obj_class(ary), T_ARRAY);
MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY(dup)->len = RARRAY(ary)->len;
OBJ_INFECT(dup, ary);