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#underscore with multi-character downcasing #13540

Conversation

HertzDevil
Copy link
Contributor

This is similar to #13539, although it really only affects strings that contain İ and do not use Unicode::CaseOptions::Turkic.

Since the compiler uses String#underscore to generate question methods for enums as well, there is a non-zero but negligible chance this could break someone's code:

enum Foo
  Barİ
end

Foo::Barİ.bari?  # no longer compiles
Foo::Barİ.bar_i̇? # will compile

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text labels Jun 1, 2023
@straight-shoota straight-shoota added this to the 1.9.0 milestone Jun 5, 2023
@straight-shoota straight-shoota merged commit 6ea9441 into crystal-lang:master Jun 6, 2023
@HertzDevil HertzDevil deleted the bug/string-underscore-multichar branch June 15, 2023 12:28
Blacksmoke16 pushed a commit to Blacksmoke16/crystal that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants