On Aug 14, 2007, at 11:44 PM, nikolai.weibull / gmail.com wrote:

> So, should Pathname#== respect the platforms case insensitivity, for
> example, on Windows and on Mac OS?

Seems like a bad idea to me.  Case sensitivity is not a property of  
the platform; it is a property of a given file system.  It's easy to  
have some case sensitive and some case insensitive file systems on  
many platforms, including Mac OS and Windows.

Besides, there is more to pathname equivalence than case sensitivity.   
For example, some older file systems defined case insensitivity based  
on the letters A through Z, completely ignoring other characters.   
Worse, they often just assumed 0x41 == 0x61, even for multi-byte  
character encodings (meaning two unrelated characters were considered  
equal).  Some file systems take diacriticals into account, and some  
don't.

In the end, you generally have to ask the file system to look up the  
path and return some unique identifier (such as a combination of  
device identifier and node number).  Then you can (usually) compare  
those unique identifiers.  That only works for paths that already  
exist.  Predicting whether a non-existant path will be equivalent to  
some other path is hard.

-Mark