File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6668,6 +6668,7 @@ pm_node_check_it(pm_parser_t *parser, pm_node_t *node) {
6668
6668
if (
6669
6669
(parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) &&
6670
6670
!parser->current_scope->closed &&
6671
+ (parser->current_scope->numbered_parameters != PM_SCOPE_NUMBERED_PARAMETERS_DISALLOWED) &&
6671
6672
pm_node_is_it(parser, node)
6672
6673
) {
6673
6674
pm_local_variable_read_node_t *read = pm_local_variable_read_node_create_it(parser, &parser->previous);
@@ -14299,7 +14300,12 @@ parse_pattern_primitive(pm_parser_t *parser, pm_diagnostic_id_t diag_id) {
14299
14300
pm_node_t *variable = (pm_node_t *) parse_variable(parser);
14300
14301
14301
14302
if (variable == NULL) {
14302
- if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0 && pm_token_is_it(parser->previous.start, parser->previous.end)) {
14303
+ if (
14304
+ (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) &&
14305
+ !parser->current_scope->closed &&
14306
+ (parser->current_scope->numbered_parameters != PM_SCOPE_NUMBERED_PARAMETERS_DISALLOWED) &&
14307
+ pm_token_is_it(parser->previous.start, parser->previous.end)
14308
+ ) {
14303
14309
pm_local_variable_read_node_t *read = pm_local_variable_read_node_create_it(parser, &parser->previous);
14304
14310
if (read == NULL) read = pm_local_variable_read_node_create(parser, &parser->previous, 0);
14305
14311
variable = (pm_node_t *) read;
You can’t perform that action at this time.
0 commit comments