From 04311008b6fcb32d3a9512b644acc6b74e4d07cd Mon Sep 17 00:00:00 2001 From: Shugo Maeda Date: Mon, 5 Dec 2022 15:52:45 +0900 Subject: Use loc to fix a failure of test_ast.rb ``` 1) Failure: TestAst#test_ranges:test/fiber/scheduler.rb [/home/runner/work/ruby/ruby/src/test/ruby/test_ast.rb:122]: <[]> expected but was <[{:type=>:max_validation_error, :max=> #, :end_pos=> #, :node=> (BLOCK_PASS@203:15-203:19 (ARGSPUSH@203:15-203:20 (SPLAT@203:16-203:19 (LVAR@203:16-203:19 :*)) (HASH@203:16-203:19 (LIST@203:16-203:19 nil (LVAR@203:16-203:19 :**) nil))) (LVAR@203:16-203:19 :&))}]>. ``` --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 85eb046731..68352d7b79 100644 --- a/parse.y +++ b/parse.y @@ -13279,7 +13279,7 @@ new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *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 *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc); - args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc); + args = arg_append(p, args, new_hash(p, kwrest, loc), loc); return arg_blk_pass(args, block); } #endif -- cgit v1.2.3