From: Robert Klemme Date: 2004-04-30T23:14:00+09:00 Subject: Re: File.expand_path(__FILE__) "Kent Dahl" schrieb im Newsbeitrag news:c6tmj9$58n$1@orkan.itea.ntnu.no... > Robert Klemme wrote: > > Where would you expect it to reside? Maybe the best solution is > > > > $0 : path as used for invocation > > __FILE__: abs path to current file > > > > Then I agree. :-) Any objections? Does this break existing code? > > Wouldn't this break the idiom of using > > if __FILE__ == $0 then > #... > end > > to make a file both require-able and executable? > I know I use it frequently. Yeah, I think it is used quite frequently. Darn. The only ad hoc sulution to this that occurs to me is to override __FILE__#== and $0#== to repair this. Now this starts getting ugly... Simon? robert