Issue #4255 has been updated by Charles Nutter.


If 1.9 does indeed get the proper expanded path of the file, and also *uses* that expanded path for LOADED_FEATURES, then I agree the case-insensitivity change is unnecessary.
----------------------------------------
Bug #4255: When on a case-insensitive filesystem, "loaded features" search in require should ignore case
http://redmine.ruby-lang.org/issues/4255

Author: Charles Nutter
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 
ruby -v: -


=begin
 This should not re-load the same library when running on a system with case-insensitive filenames:
 
  require 'blah'
  require 'BLAH'
 
 The resource in question has been loaded, and should not be reloaded again, even if it is attempted with a differing case.
 
 The above case seems contrived, but we have run into many real-world cases of this problem:
 
 * win32 APIs return paths with the drive name capitalized. Many libraries that manipulate load paths use lower-case drive names. (C: versus c:)
 * User code that adds load path entries at command-line or in script can easily differ in case
 * Typos in path names that introduce case differences will quietly work but cause double-requires. These may or may not be detected.
 
 A specific case in JRuby caused a series of files to be loaded twice, ultimately resulting in an alias chain looping back on itself (!!!). This is an extremely difficult case to debug, but very easy to reproduce.
 
 I propose that Ruby 1.9 (and ideally Ruby 1.8, since I consider this a bug and not a feature) should treat "loaded features" $" entries sourced from a case-insensitive filesystem with a case-insensitive comparison.
=end



-- 
http://redmine.ruby-lang.org