diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2020-03-13 21:43:44 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-03-13 21:51:06 +0900 |
commit | 5bdbee96e479f714c7f9b6b98f012268cbd9051b (patch) | |
tree | 1d86c625ad92dda7820ce8c68cb1c577938fe216 /parse.y | |
parent | a9284ecb90176b4d8e9aa264da14ea08931be48f (diff) |
Squashed commit of the following: [Backport #16516]
commit c98c492578d898dc07a04b8240d8d5b1508ffafa
Author: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Fri Jan 17 16:56:53 2020 +0900
Added test for f38b3e8c707ebdcad05aa9485cf1760640b74fbb
commit f38b3e8c707ebdcad05aa9485cf1760640b74fbb
Author: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Thu Jan 16 18:34:31 2020 +0900
Fixed the location of args node with numbered parameter
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |