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#tr 1 byte from optimization bug #5913

Merged
merged 1 commit into from Apr 4, 2018

Conversation

makenowjust
Copy link
Contributor

Ref: #5912 (comment)

"aabbcc".tr("a", "xyz") yields "xyzxyzbbcc" currently.
Of course it is unintentional behavior, also bug. In Ruby it yields "xxbbcc" and on shell echo aabbcc | tr a xyz shows xxbbcc in fact.

Ref: crystal-lang#5912 (comment)

`"aabbcc".tr("a", "xyz")` yields `"xyzxyzbbcc"` currently.
Of course it is unintentional behavior, in Ruby it yields `"xxbbcc"` and
on shell `echo aabbcc | tr a xyz` shows `xxbbcc`.
@ysbaddaden ysbaddaden merged commit 9662abe into crystal-lang:master Apr 4, 2018
@ysbaddaden
Copy link
Contributor

Thank you!

@makenowjust makenowjust deleted the fix/string/tr-bug branch April 4, 2018 11:24
@RX14 RX14 added this to the Next milestone Apr 5, 2018
@RX14
Copy link
Contributor

RX14 commented Apr 5, 2018

Please remember to milestone and label!

@ysbaddaden
Copy link
Contributor

I can't from my phone :(

@straight-shoota
Copy link
Member

@ysbaddaden You should be able use the desktop view (link is at the bottom of the mobile page).

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

Successfully merging this pull request may close these issues.

None yet

5 participants