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:
parent
efb91ff19b
commit
4325e90205
Notes:
git
2022-07-26 22:12:36 +09:00
1 changed files with 1 additions and 2 deletions
3
array.c
3
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue