aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/array.c b/array.c
index 5d327bc6be..17b9f9d6b3 100644
--- a/array.c
+++ b/array.c
@@ -550,6 +550,15 @@ rb_ary_tmp_new(long capa)
return ary_new(0, capa);
}
+VALUE
+rb_ary_tmp_new_fill(long capa)
+{
+ VALUE ary = ary_new(0, capa);
+ ary_memfill(ary, 0, capa, Qnil);
+ ARY_SET_LEN(ary, capa);
+ return ary;
+}
+
void
rb_ary_free(VALUE ary)
{