diff --git a/prism/prism.c b/prism/prism.c index 79258386d6..b897d9cdd7 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -15254,11 +15254,12 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b accept1(parser, PM_TOKEN_NEWLINE); if (accept1(parser, PM_TOKEN_PARENTHESIS_LEFT)) { - arguments.opening_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous); + pm_token_t lparen = parser->previous; if (accept1(parser, PM_TOKEN_PARENTHESIS_RIGHT)) { - arguments.closing_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous); + receiver = (pm_node_t *) pm_parentheses_node_create(parser, &lparen, NULL, &parser->previous); } else { + arguments.closing_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous); receiver = parse_expression(parser, PM_BINDING_POWER_COMPOSITION, true, PM_ERR_NOT_EXPRESSION); pm_conditional_predicate(receiver); diff --git a/version.h b/version.h index 5217d920d3..2715555ea3 100644 --- a/version.h +++ b/version.h @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 140 +#define RUBY_PATCHLEVEL 141 #include "ruby/version.h" #include "ruby/internal/abi.h"