diff options
author | Peter Zhu <[email protected]> | 2022-07-25 10:40:45 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-07-26 09:12:09 -0400 |
commit | efb91ff19b739b759f40af2673f942e80d212857 (patch) | |
tree | ace9d897856748fba7537390a6674695af23a0f3 /vm_args.c | |
parent | 3f70aa6504d4c63a3cc928c52d6cf88dafffb40d (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6180
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -280,7 +280,7 @@ static VALUE make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv) { int i; - VALUE obj = rb_ary_tmp_new(1); + VALUE obj = rb_ary_hidden_new(1); for (i=0; i<passed_keyword_len; i++) { if (kw_argv[i] != Qundef) { @@ -343,7 +343,7 @@ args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *cons found++; } else { - if (!missing) missing = rb_ary_tmp_new(1); + if (!missing) missing = rb_ary_hidden_new(1); rb_ary_push(missing, ID2SYM(key)); } } @@ -907,7 +907,7 @@ vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t * VALUE func = rb_hash_lookup(ref, block_code); if (NIL_P(func)) { /* TODO: limit cached funcs */ - VALUE callback_arg = rb_ary_tmp_new(2); + VALUE callback_arg = rb_ary_hidden_new(2); rb_ary_push(callback_arg, block_code); rb_ary_push(callback_arg, ref); OBJ_FREEZE_RAW(callback_arg); |