1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use rb_ary_hidden_new for rb_ary_hidden_new_fill

This commit is contained in:
Peter Zhu 2022-07-25 10:47:49 -04:00
parent efb91ff19b
commit 4325e90205
Notes: git 2022-07-26 22:12:36 +09:00

View file

@ -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;
}