From cac048a16c83fa2e0ace6ddb1b9d6319c2def1b6 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 21 Nov 2017 11:15:51 +0000 Subject: [PATCH] vm_args.c: ec arg of args_setup_kw_parameters * vm_args.c (args_setup_kw_parameters): use same ec as the caller. make arguments order consistent with other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_args.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/vm_args.c b/vm_args.c index 2499632f7a..997b0b2f48 100644 --- a/vm_args.c +++ b/vm_args.c @@ -393,8 +393,9 @@ args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const pas } static void -args_setup_kw_parameters(VALUE* const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords, - const rb_iseq_t * const iseq, VALUE * const locals) +args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq, + VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords, + VALUE *const locals) { const ID *acceptable_keywords = iseq->body->param.keyword->table; const int req_key_num = iseq->body->param.keyword->required_num; @@ -416,7 +417,7 @@ args_setup_kw_parameters(VALUE* const passed_values, const int passed_keyword_le } } - if (missing) argument_kw_error(GET_EC(), iseq, "missing", missing); + if (missing) argument_kw_error(ec, iseq, "missing", missing); for (di=0; ikw_argv != NULL) { const struct rb_call_info_kw_arg *kw_arg = args->kw_arg; - args_setup_kw_parameters(args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, iseq, klocals); + args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals); } else if (!NIL_P(keyword_hash)) { int kw_len = rb_long2int(RHASH_SIZE(keyword_hash)); @@ -651,11 +652,11 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co arg.argc = 0; rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg); VM_ASSERT(arg.argc == kw_len); - args_setup_kw_parameters(arg.vals, kw_len, arg.keys, iseq, klocals); + args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals); } else { VM_ASSERT(args_argc(args) == 0); - args_setup_kw_parameters(NULL, 0, NULL, iseq, klocals); + args_setup_kw_parameters(ec, iseq, NULL, 0, NULL, klocals); } } else if (iseq->body->param.flags.has_kwrest) {