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

Fix Regexp.escape/quote not escaping dollar signs #2222

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

timcraft
Copy link
Contributor

@timcraft timcraft commented Aug 26, 2024

Dollar signs should be escaped/quoted:

$ irb
irb(main):001> Regexp.escape '$'
=> "\\$"

@herwinw
Copy link
Member

herwinw commented Sep 16, 2024

The change looks good. Could you also remove the NATFIXME block in spec/core/regexp/shared/new.rb line 59 (just remove that line and the corresponding end line, and fix the indentation of the current line 60). You've accidentally fixed that bug too ;)

It would be even better if we could include the upstream spec fix too, but that's out of our control.

@herwinw herwinw merged commit 1ffc88c into master Sep 18, 2024
15 checks passed
@herwinw herwinw deleted the regexp-escape branch September 18, 2024 08:41
@timcraft
Copy link
Contributor Author

Thanks! I mistakenly assumed the build was broken 😆

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.

2 participants