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 3789e4f6d9..423030ac41 100644
--- a/array.c
+++ b/array.c
@@ -3082,7 +3082,7 @@ flatten(ary, level, modified)
st_data_t id;
stack = rb_ary_new();
- result = rb_ary_new();
+ result = ary_new(rb_class_of(ary), RARRAY_LEN(ary));
memo = st_init_numtable();
st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue);
*modified = 0;