aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index d378e48967..a6d5f425db 100644
--- a/enum.c
+++ b/enum.c
@@ -521,7 +521,7 @@ enum_to_a(int argc, VALUE *argv, VALUE obj)
ary = rb_ary_new();
}
else {
- ary = rb_ary_new2(NUM2LONG(size));
+ ary = rb_ary_new_capa(NUM2LONG(size));
}
rb_block_call(obj, id_each, argc, argv, collect_all, ary);