mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[ruby/prism] Only accept command call when specified for constant path
0ae908b6ee
This commit is contained in:
parent
56a51fcd33
commit
e5e079e70f
1 changed files with 1 additions and 1 deletions
|
@ -20714,7 +20714,7 @@ parse_expression_infix(pm_parser_t *parser, pm_node_t *node, pm_binding_power_t
|
|||
|
||||
if (
|
||||
(parser->current.type == PM_TOKEN_PARENTHESIS_LEFT) ||
|
||||
(token_begins_expression_p(parser->current.type) || match3(parser, PM_TOKEN_UAMPERSAND, PM_TOKEN_USTAR, PM_TOKEN_USTAR_STAR))
|
||||
(accepts_command_call && (token_begins_expression_p(parser->current.type) || match3(parser, PM_TOKEN_UAMPERSAND, PM_TOKEN_USTAR, PM_TOKEN_USTAR_STAR)))
|
||||
) {
|
||||
// If we have a constant immediately following a '::' operator, then
|
||||
// this can either be a constant path or a method call, depending on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue