mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[ruby/prism] Unreference before destroying in call node in pattern
https://github.com/ruby/prism/commit/609c80c91e
This commit is contained in:
parent
eceab2f44c
commit
ac946e076c
@ -16690,6 +16690,8 @@ parse_pattern_primitive(pm_parser_t *parser, pm_constant_id_list_t *captures, pm
|
||||
if (PM_NODE_TYPE(node) == PM_CALL_NODE) {
|
||||
pm_parser_err_node(parser, node, diag_id);
|
||||
pm_missing_node_t *missing_node = pm_missing_node_create(parser, node->location.start, node->location.end);
|
||||
|
||||
pm_node_unreference(parser, node);
|
||||
pm_node_destroy(parser, node);
|
||||
return UP(missing_node);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user