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. --- class.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'class.c') diff --git a/class.c b/class.c index 4306b7c0f3..54d9e6e177 100644 --- a/class.c +++ b/class.c @@ -507,7 +507,7 @@ rb_mod_init_copy(VALUE clone, VALUE orig) VALUE p = RCLASS_SUPER(orig); VALUE orig_origin = RCLASS_ORIGIN(orig); VALUE prev_clone_p = clone; - VALUE origin_stack = rb_ary_tmp_new(2); + VALUE origin_stack = rb_ary_hidden_new(2); VALUE origin[2]; VALUE clone_p = 0; long origin_len; @@ -1250,7 +1250,7 @@ do_include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super RCLASS_SET_INCLUDER(iclass, klass); add_subclass = TRUE; if (module != RCLASS_ORIGIN(module)) { - if (!origin_stack) origin_stack = rb_ary_tmp_new(2); + if (!origin_stack) origin_stack = rb_ary_hidden_new(2); VALUE origin[2] = {iclass, RCLASS_ORIGIN(module)}; rb_ary_cat(origin_stack, origin, 2); } @@ -2310,7 +2310,7 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V continue; } } - if (NIL_P(missing)) missing = rb_ary_tmp_new(1); + if (NIL_P(missing)) missing = rb_ary_hidden_new(1); rb_ary_push(missing, keyword); } if (!NIL_P(missing)) { -- cgit v1.2.1