From: David Masover Date: 2011-06-20T01:44:41+09:00 Subject: Re: RFC - One word alias for require_relative On Saturday, June 18, 2011 04:45:06 PM Ilias Lazaridis wrote: > On 18 Ιούν, 05:40, David Masover wrote: > > We've been over this, and I honestly thought you understood last time. > > [...] > > There is no "we". > > You have to understand that I don't read your writings. Demonstrably false. Remember this? On Wednesday, June 15, 2011 04:40:50 PM Ilias Lazaridis wrote: > On 16 Ιούν, 00:27, David Masover wrote: > > On Wednesday, June 15, 2011 02:55:31 PM Ilias Lazaridis wrote: > > > On 15 Éïýí, 22:26, Florian Gilcher wrote: > > > > On Jun 15, 2011, at 9:10 PM, Ilias Lazaridis wrote: > > > > > require_relative 'lib/alter' > > > > > require './lib/alter' > > > > > > > > > > To my understanding, both should do the same thing. > > > > > > > > > > Is this right? > > > > > > > > No, the first is relative to the file, the second is relative to > > > > "Dir.pwd", the process working directory. > > > > > > I understand. > > > > > > Thus the first works for the main file, *and* for included files which > > > can use again require_relative. > > > > > > The second works only for the main file (usually executed from it's > > > location). > > > > Not really, no. > > > > More like, the first works wherever I'd normally be hacking around with > > __FILE__ to get a decent require path. > > > > The second doesn't work at all, unless it's actually what you intend. For > > instance, if I add a ruby script to my PATH as a command, and then run > > it, what directory I happen to be in when I run it is what determines > > what the second is relative to. > > > > Even on Windows, the working directory isn't always where the main file > > is. > > Yes, you're right. > > I forgot those cases. So while you've found me to be helpful as recently as Wednesday, you also seem to have trouble remembering a distinction I made on Wednesday. I'd say something like "The plot thickens," but honestly, who didn't see this coming?