Skip to content

Commit

Permalink
Merge pull request #2835 from ruby/fix-module-name
Browse files Browse the repository at this point in the history
Only accept command call when specified for constant path
  • Loading branch information
kddnewton committed May 23, 2024
2 parents f313f37 + 0ae908b commit a05813d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a05813d

Please sign in to comment.