Skip to content

Commit

Permalink
Use rb_ary_hidden_new for rb_ary_hidden_new_fill
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Jul 26, 2022
1 parent efb91ff commit 4325e90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions array.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4325e90

Please sign in to comment.