mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
Remove needless ruby2_keywords field from struct rb_args_info
`ruby2_keywords` is set only to be `0` in parse.y. However `args->ruby2_keywords` is initialized with `0` by `MEMZERO` in `rb_node_args_new` function and `body->param.flags.ruby2_keywords` is initialized with `0` by `ZALLOC` in `rb_iseq_constant_body_alloc` function, so `args->ruby2_keywords` does nothing for `body->param.flags.ruby2_keywords`.
This commit is contained in:
parent
576acb9502
commit
056997cbcd
Notes:
git
2025-12-09 01:09:30 +00:00
@ -2106,7 +2106,6 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons
|
||||
|
||||
EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS, COMPILE_NG);
|
||||
|
||||
body->param.flags.ruby2_keywords = args->ruby2_keywords;
|
||||
body->param.lead_num = arg_size = (int)args->pre_args_num;
|
||||
if (body->param.lead_num > 0) body->param.flags.has_lead = TRUE;
|
||||
debugs(" - argc: %d\n", body->param.lead_num);
|
||||
|
||||
2
parse.y
2
parse.y
@ -14430,8 +14430,6 @@ new_args(struct parser_params *p, rb_node_args_aux_t *pre_args, rb_node_opt_arg_
|
||||
|
||||
args->opt_args = opt_args;
|
||||
|
||||
args->ruby2_keywords = 0;
|
||||
|
||||
nd_set_loc(RNODE(tail), loc);
|
||||
|
||||
return tail;
|
||||
|
||||
@ -782,7 +782,6 @@ struct rb_args_info {
|
||||
|
||||
struct RNode_OPT_ARG *opt_args;
|
||||
unsigned int no_kwarg: 1;
|
||||
unsigned int ruby2_keywords: 1;
|
||||
unsigned int forwarding: 1;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user