summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-07-25 10:40:45 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-07-26 09:12:09 -0400
commitefb91ff19b739b759f40af2673f942e80d212857 (patch)
treeace9d897856748fba7537390a6674695af23a0f3 /class.c
parent3f70aa6504d4c63a3cc928c52d6cf88dafffb40d (diff)
downloadruby-efb91ff19b739b759f40af2673f942e80d212857.tar.gz
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.
Diffstat (limited to 'class.c')
-rw-r--r--class.c6
1 files changed, 3 insertions, 3 deletions
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)) {