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

Actually ignore FNM_CASEFOLD flag in Dir.glob #4583

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

jeremyevans
Copy link
Contributor

This was already documented as being ignored, but it wasn't being
ignored, causing an issue in a particular case where a UTF-8
pattern was provided and a filename was tested that wasn't valid
UTF-8.

Fixes [Bug #14456]

This was already documented as being ignored, but it wasn't being
ignored, causing an issue in a particular case where a UTF-8
pattern was provided and a filename was tested that wasn't valid
UTF-8.

Fixes [Bug #14456]
@jeremyevans jeremyevans merged commit a259270 into ruby:master Jun 24, 2021
lildude added a commit to github-linguist/linguist that referenced this pull request Nov 13, 2022
* ci: drop ruby 2.5

* Add 3.1

* Implement case-insensitive glob pattern builder

This is needed on  3.1 onwards as `FNM_CASEFOLD` is no longer honoured on 3.1 as of ruby/ruby#4583 which brings the `Dir.glob` behaviour inline with what the https://docs.ruby-lang.org/en/3.1/File/File/Constants.html#FNM_CASEFOLD have been saying for years.

Co-authored-by: Colin Seymour <colin@github.com>
@chuckd
Copy link

chuckd commented Feb 9, 2023

This was the only way to get Dir.glob to work case insensitively, it might have been documented this way but there were plenty of people using it. Now caused frustrating bug in our app. And the workaround is nasty:

github-linguist/linguist@a595c22

tpendragon added a commit to pulibrary/figgy that referenced this pull request Apr 7, 2023
ruby/ruby#4583 made FNM_CASEFOLD no longer work
in Dir.glob (it was documented as such for years), so we have to iterate
and filter.
tpendragon added a commit to pulibrary/figgy that referenced this pull request Apr 7, 2023
ruby/ruby#4583 made FNM_CASEFOLD no longer work
in Dir.glob (it was documented as such for years), so we have to iterate
and filter.
tpendragon added a commit to pulibrary/figgy that referenced this pull request Apr 7, 2023
ruby/ruby#4583 made FNM_CASEFOLD no longer work
in Dir.glob (it was documented as such for years), so we have to iterate
and filter.
tpendragon added a commit to pulibrary/figgy that referenced this pull request Apr 10, 2023
ruby/ruby#4583 made FNM_CASEFOLD no longer work
in Dir.glob (it was documented as such for years), so we have to iterate
and filter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants