From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-05-04T01:53:01+09:00 Subject: Re: require and case In article <20020503090059.GA734@localhost>, Cameron McBride wrote: >> >Should require be case insensitive or should it give a warning if the module >> >it's trying to load has different case to that specified? >> >> Well, you wouldn't have had an issue on Unix, but because the Windows >> filesystem only pretends to be case-sensitive and then really isn't this >> is what happens. Maybe there should be a warning, but it should only be >> enabled on Windows... Don't need or want it on the Unices. > >I disagree. If I were writing an app on my happy linux box, but I >wanted to distribute it about and have it work on Windows -- I would >want the warning. > >Without the warning -- it seems a quick way to introduce 'porting' >problems on a script that otherwise shouldn't have them. Anyhow, why >would I want to use same name / different case package names? If I do >it -- its got to be a mistake anyhow... ;-) Well, maybe I should clarify my statement. Let's say you're on Unix and the file you want to require is named Some.rb. Now if you say: require 'some' You're going to get an error that says that some.rb doesn't exist in the search path. But on Windows it would have worked because even though you see the file in your file viewer as Some.rb, it'll accept some.rb. So the warning isn't needed under Unix because you'll get an error anyway if you try to mixup the case of the name of the file being required. Phil