summaryrefslogtreecommitdiff
path: root/prism/prism.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-01-02 14:10:37 -0500
committergit <[email protected]>2024-01-02 19:10:43 +0000
commit380c218bfa85dcb1418c72144f59550999ef396c (patch)
treea187acba0510b655d078ef9badaf9dafafefe42e /prism/prism.c
parent0ee625ceae004f2ca53ebe234310ff2d44f7388c (diff)
[ruby/prism] Do not add error for forwarding in CRuby 3.3.0
https://github.com/ruby/prism/commit/a28e57c650
Diffstat (limited to 'prism/prism.c')
-rw-r--r--prism/prism.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/prism/prism.c b/prism/prism.c
index 29505a9646..ea4e730ac2 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -12178,7 +12178,9 @@ parse_arguments_list(pm_parser_t *parser, pm_arguments_t *arguments, bool accept
arguments->block = (pm_node_t *) block;
} else {
if (arguments->has_forwarding) {
- pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
+ if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) {
+ pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
+ }
} else {
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_MULTI);
}