mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
Should use argsloc for the last argument for arg_append()
This commit is contained in:
parent
f6dad39544
commit
2649055c98
1 changed files with 2 additions and 2 deletions
4
parse.y
4
parse.y
|
@ -13278,8 +13278,8 @@ new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc
|
||||||
NODE *rest = NEW_LVAR(idFWD_REST, loc);
|
NODE *rest = NEW_LVAR(idFWD_REST, loc);
|
||||||
NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
|
NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
|
||||||
NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), loc);
|
NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), loc);
|
||||||
NODE *args = leading ? rest_arg_append(p, leading, rest, loc) : NEW_SPLAT(rest, loc);
|
NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc);
|
||||||
args = arg_append(p, args, new_hash(p, kwrest, loc), loc);
|
args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
|
||||||
return arg_blk_pass(args, block);
|
return arg_blk_pass(args, block);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue