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 String#gsub and #tr ASCII-only optimisations #5498

Closed
wants to merge 1 commit into from

Conversation

chastell
Copy link
Contributor

@chastell chastell commented Jan 1, 2018

b14d8c7 introduced some String#gsub and #tr optimisations for ASCII-only replacements. Unfortunately, to the best of my understading, for those optimisations to work the String itself has to be ASCII-only – with the current implementation String#gsub_ascii_char turns "foo bär".tr(" ", "-") into "foo-bä\u0000"

@chastell chastell force-pushed the ASCII_replacements branch 2 times, most recently from 7fa148a to c1512fa Compare January 1, 2018 11:41
@asterite
Copy link
Member

asterite commented Jan 1, 2018

I believe #5350 has a more general fix for this.

@chastell
Copy link
Contributor Author

chastell commented Jan 1, 2018

Ah, right, apologies, I totally missed that PR! Closing.

@chastell chastell closed this Jan 1, 2018
@chastell chastell deleted the ASCII_replacements branch January 1, 2018 15:07
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.

None yet

2 participants