From 4325e90205aa4cd0ea031df1b5e6334bfd9c7e51 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 25 Jul 2022 10:47:49 -0400 Subject: [PATCH] Use rb_ary_hidden_new for rb_ary_hidden_new_fill --- array.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/array.c b/array.c index af68968a05..8c7fa583e9 100644 --- a/array.c +++ b/array.c @@ -977,10 +977,9 @@ rb_ary_hidden_new(long capa) VALUE rb_ary_hidden_new_fill(long capa) { - VALUE ary = ary_new(0, capa); + VALUE ary = rb_ary_hidden_new(capa); ary_memfill(ary, 0, capa, Qnil); ARY_SET_LEN(ary, capa); - rb_ary_transient_heap_evacuate(ary, TRUE); return ary; }