From: "Mauricio Fernández" Date: 2004-04-30T16:08:33+09:00 Subject: Re: File.expand_path(__FILE__) On Fri, Apr 30, 2004 at 09:23:53AM +0900, Hal Fulton wrote: > And I guess there is a problem with what the OP wanted -- > if the original name is relative to the original current > directory, then the interpreter would have to keep track > of where we were relative to our original dir. > > It is doable, but is it worth it? And is there a real > purpose to expand_path besides tilde substitution and > simple concatenation? It does more than simple concatenation + ~ subst., it concatenates & normalizes: Dir.pwd # =>"/tmp" File.expand_path "../bin/sh" # =>"/bin/sh" # not => "/tmp/../bin/sh" -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com "You, sir, are nothing but a pathetically lame salesdroid! I fart in your general direction!" -- Randseed on #Linux