summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 1281eb6258..16c464e49e 100644
--- a/parse.y
+++ b/parse.y
@@ -11377,7 +11377,11 @@ static NODE *
args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
{
if (max_numparam > NO_PARAM) {
- if (!args) args = new_args_tail(p, 0, 0, 0, 0);
+ if (!args) {
+ YYLTYPE loc = RUBY_INIT_YYLLOC();
+ args = new_args_tail(p, 0, 0, 0, 0);
+ nd_set_loc(args, &loc);
+ }
args->nd_ainfo->pre_args_num = max_numparam;
}
return args;