From: Xavier Shay Date: 2011-05-18T17:25:49+09:00 Subject: [ruby-core:36309] [Ruby 1.9 - Bug #4255] When on a case-insensitive filesystem, "loaded features" search in require should ignore case Issue #4255 has been updated by Xavier Shay. > We can imagine contrived example, such as 'if rubygems inserts crafted String to $" by itself?' MRI ruby tests and rubyspec both rely on being able to change $". Not sure how much of a circular justification that is. I worry that backporting specific fixes that have already gone into trunk to 1.8 may introduce the same performance regressions we've seen in 1.9. Would it be worth instead trying to get my patch [1] over the line (which addresses this issue) and backporting that? [1] http://redmine.ruby-lang.org/issues/show/3924 ---------------------------------------- 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: Any version =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