Skip to content

Commit 64baf94

Browse files
committed
Remove flag gating for 3.3.0 bug fixes
1 parent 606810c commit 64baf94

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

include/prism/options.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ typedef struct pm_options_scope {
2525
} pm_options_scope_t;
2626

2727
/**
28-
* The version of prism that we should be parsing with. This is used to allow
29-
* consumers to specify which behavior they want in case they need to parse
30-
* exactly as a specific version of CRuby.
28+
* The version of Ruby syntax that we should be parsing with. This is used to
29+
* allow consumers to specify which behavior they want in case they need to
30+
* parse in the same way as a specific version of CRuby would have.
3131
*/
3232
typedef enum {
3333
/** The current version of prism. */

src/prism.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,14 +2203,10 @@ pm_index_target_node_create(pm_parser_t *parser, pm_call_node_t *target) {
22032203
pm_index_target_node_t *node = PM_ALLOC_NODE(parser, pm_index_target_node_t);
22042204
pm_node_flags_t flags = target->base.flags;
22052205

2206-
if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) {
2207-
flags |= PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE;
2208-
}
2209-
22102206
*node = (pm_index_target_node_t) {
22112207
{
22122208
.type = PM_INDEX_TARGET_NODE,
2213-
.flags = flags,
2209+
.flags = flags | PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE,
22142210
.location = target->base.location
22152211
},
22162212
.receiver = target->receiver,
@@ -12306,9 +12302,7 @@ parse_arguments_list(pm_parser_t *parser, pm_arguments_t *arguments, bool accept
1230612302
arguments->block = (pm_node_t *) block;
1230712303
} else {
1230812304
if (arguments->has_forwarding) {
12309-
if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) {
12310-
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
12311-
}
12305+
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
1231212306
} else {
1231312307
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_MULTI);
1231412308
}

0 commit comments

Comments
 (0)