Skip to content

Commit

Permalink
Only accept command call when specified for constant path
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed May 23, 2024
1 parent f313f37 commit 0ae908b
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 0ae908b

Please sign in to comment.