Project

General

Profile

Actions

Feature #15363

open

Case insensitive file systems - add info to CONFIG or somewhere?

Added by MSP-Greg (Greg L) over 2 years ago. Updated over 2 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:90198]

Description

I was under the impression that Windows was the only case insensitive file system. That is not the case. In RubyGems, there are places in both code and tests where this needs to be accounted for.

Although none come to mind, the same may exist here. I haven't seen anything defining it's state. If I'm not mistaken, could something like the following be added, maybe as an additional CONFIG key or constant somewhere?

if __FILE__ != __FILE__.downcase
  FS_CASE_INSENS = File.exists?(__FILE__.downcase)
elsif __FILE__ != __FILE.upcase
  FS_CASE_INSENS = File.exists?(__FILE__.upcase)
else
  FS_CASE_INSENS = true # indeterminate? assume true?
end
p "FS_CASE_INSENS #{FS_CASE_INSENS}"

Thanks, Greg

Actions

Also available in: Atom PDF