From: Gavin Kistner Date: 2004-10-26T22:55:46+09:00 Subject: Re: Relative #require On Oct 24, 2004, at 2:54 PM, Tobias Peters wrote: > Gavin Kistner wrote: >> Thanks for passing this along, although it doesn't work. > > Hi Gavin. You modified the source and moved the "caller" call into the > block. That's what broke it. I appreciate you pointing out the working code, though for the record, it wasn't I who moved anything anywhere...I was just responding to what trans passed along. > I agree it does not feel all that robust. I suppose it will break on a > system using ":" as path separator. For all I know, Macs may or may > not use ":" as path separator. (Perhaps a Macintosh user could > clarify.) MacOS X, as a *nix, uses '/' just fine. And in any case, File.join uses File::SEPARATOR, so it should theoretically work even if MacOS used a different separator. But I just tested yours, and as long as caller[0] isn't inside an each, it's doing the 'right' thing and works like a charm. Thanks! :) (Or, inside the block, change it to caller[2])