"Robert Klemme" <bob.news / gmx.net> wrote:
> "Simon Strandgaard" <neoneye / adslhome.dk> schrieb im Newsbeitrag
> >
> > Maybe extend __FILE__ with a #absolute  method,
> > in order to make __FILE__ immune against chdir ?
> 
> This is easily fixed:
> 
> FILE = File.expand_path __FILE__
> p [__FILE__, FILE]

Not if the person has done a chdir just before expand_path.
I wonder why __FILE__ isn't an absolute path. Relative paths is
just too fragile. 


Proposal:  make __FILE__ an absolute path.
That would make __FILE__ robust to Dir.chdir.


Any thoughts on this proposal?   fore or against

--
Simon