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 37f21f6d3b..a285f8a183 100644
--- a/array.c
+++ b/array.c
@@ -2506,7 +2506,7 @@ rb_ary_times(ary, times)
}
len = NUM2LONG(times);
- if (len == 0) return rb_ary_new2(0);
+ if (len == 0) return ary_new(rb_obj_class(ary), 0);
if (len < 0) {
rb_raise(rb_eArgError, "negative argument");
}