ruby-changes:54219
From: nobu <ko1@a...>
Date: Wed, 19 Dec 2018 00:06:25 +0900 (JST)
Subject: [ruby-changes:54219] nobu:r66440 (trunk): Freeze and hide callback arguments holder
nobu 2018-12-19 00:06:20 +0900 (Wed, 19 Dec 2018) New Revision: 66440 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66440 Log: Freeze and hide callback arguments holder Modified files: trunk/vm_args.c Index: vm_args.c =================================================================== --- vm_args.c (revision 66439) +++ vm_args.c (revision 66440) @@ -893,7 +893,10 @@ vm_caller_setup_arg_block(const rb_execu https://github.com/ruby/ruby/blob/trunk/vm_args.c#L893 VALUE func = rb_hash_lookup(ref, block_code); if (NIL_P(func)) { /* TODO: limit cached funcs */ - VALUE callback_arg = rb_ary_new_from_args(2, block_code, ref); + VALUE callback_arg = rb_ary_tmp_new(2); + RARRAY_ASET(callback_arg, 0, block_code); + RARRAY_ASET(callback_arg, 1, ref); + OBJ_FREEZE_RAW(callback_arg); func = rb_func_proc_new(refine_sym_proc_call, callback_arg); rb_hash_aset(ref, block_code, func); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/