Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure last encoding flag wins #1701

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

eileencodes
Copy link
Member

You can't encoding a string with more than one encoding so ensure that the last one wins.

You can't encoding a string with more than one encoding so ensure that
the last one wins.
Copy link
Member

@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job!

@kddnewton kddnewton merged commit b28bb19 into ruby:main Oct 17, 2023
@eileencodes eileencodes deleted the implement-regex-flags branch October 17, 2023 17:50
HParker pushed a commit to HParker/yarp that referenced this pull request Oct 18, 2023
@@ -779,18 +779,21 @@ parse_decimal_number(pm_parser_t *parser, const uint8_t *start, const uint8_t *e
static inline pm_node_flags_t
pm_regular_expression_flags_create(const pm_token_t *closing) {
pm_node_flags_t flags = 0;
pm_node_flags_t mask = (uint16_t) 0xFF0F;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be ~(PM_REGULAR_EXPRESSION_FLAGS_EUC_JP | PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT | ...) instead? It seems brittle to hardcode flag values here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #1721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants