From: Zev Blut Date: 2005-02-23T14:48:44+09:00 Subject: Re: Require when Executed file is required by another file. Hello, On Tue, 22 Feb 2005 15:18:55 +0900, Joel VanderWerf wrote: > Zev Blut wrote: >> Yes that is true, but I noticed if you actually go to directory with >> a symlink, it will expand to the true path. Like so: >> [Snip examples] >> > Hm, I didn't expect that. And also: > > [Snip more examples] > > I guess ruby follows symlinks when doing Dir.chdir? > > Anyway, it doesn't solve the problem of a symlinked .rb file, if that's > a problem. Yes unfortunately it does not... Personally I use require with symlinks to directories, but not files. Although, I am sure someone does require symlinked files. Your File.stat suggestion looks good, but I just confirmed, as you suggested, that it is not portable to a Windows environment. I suppose Martin Ankerl's suggestion of computing a hash of each file is the most robust. Looking at the ToDo in Ruby I noticed this: * save both "feature names" and "normalized path" in $" Maybe, there is already a better solution and it just waits for implementation :-) Zev