summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index cd6f655a14..4014c0e731 100644
--- a/parse.y
+++ b/parse.y
@@ -15070,13 +15070,13 @@ forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
args = p->lvtbl->args;
while (vars && !DVARS_TERMINAL_P(vars->prev)) {
+ conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
vars = vars->prev;
args = args->prev;
- conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
}
bool found = false;
- if (vars && vars->prev == DVARS_INHERIT) {
+ if (vars && vars->prev == DVARS_INHERIT && !found) {
found = (rb_local_defined(arg, p->parent_iseq) &&
!(all && rb_local_defined(all, p->parent_iseq)));
}