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

Catch encoding errors when parsing invalid encoding regexp #1033

Merged

Conversation

Earlopain
Copy link
Contributor

This errors when trying to set the regexp source string to binary.

prism parser logic: https://github.com/ruby/prism/blob/89c22f0e6cbe7aac81c789ca35786a9a97afcb57/src/prism.c#L7169-L7198 (whew, quite complicated)

Closes #1032

@Earlopain Earlopain force-pushed the undefined-conversion-error-regexp-n branch from 4162b46 to e66b641 Compare July 31, 2024 15:52
@iliabylich iliabylich merged commit c7af34c into whitequark:master Jul 31, 2024
9 checks passed
@iliabylich
Copy link
Collaborator

Thanks a lot!

@iliabylich
Copy link
Collaborator

Ah, do you need a release?

@Earlopain
Copy link
Contributor Author

I don't, no. It was for a pr in rubocop-ast (rubocop/rubocop-ast#305), let's check with @r7kamura instead. Thanks for asking!

@Earlopain Earlopain deleted the undefined-conversion-error-regexp-n branch July 31, 2024 16:43
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.

Parser raises for certain invalid encoding regexp
2 participants