зеркало из https://github.com/github/ruby.git
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=> #<RubyVM::AbstractSyntaxTree::Node::CodePosition:0x00007f80d630b598 @column=20, @lineno=203>, :end_pos=> #<RubyVM::AbstractSyntaxTree::Node::CodePosition:0x00007f80d630b778 @column=19, @lineno=203>, :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 :&))}]>. ```
This commit is contained in:
Родитель
0cfe77d4f6
Коммит
04311008b6
2
parse.y
2
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче