From efb91ff19b739b759f40af2673f942e80d212857 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 25 Jul 2022 10:40:45 -0400 Subject: Rename rb_ary_tmp_new to rb_ary_hidden_new rb_ary_tmp_new suggests that the array is temporary in some way, but that's not true, it just creates an array that's hidden and not on the transient heap. This commit renames it to rb_ary_hidden_new. --- struct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index d1c8ae24f2..7085042b43 100644 --- a/struct.c +++ b/struct.c @@ -115,7 +115,7 @@ struct_set_members(VALUE klass, VALUE /* frozen hidden array */ members) while (mask < members_length * AREF_HASH_UNIT) mask *= 2; - back = rb_ary_tmp_new(mask + 1); + back = rb_ary_hidden_new(mask + 1); rb_ary_store(back, mask, INT2FIX(members_length)); mask -= 2; /* mask = (2**k-1)*2 */ @@ -810,7 +810,7 @@ rb_struct_new(VALUE klass, ...) size = rb_long2int(num_members(klass)); if (size > numberof(tmpargs)) { - tmpargs[0] = rb_ary_tmp_new(size); + tmpargs[0] = rb_ary_hidden_new(size); mem = RARRAY_PTR(tmpargs[0]); } va_start(args, klass); -- cgit v1.2.3