From: Jim Freeze Date: 2008-10-14T04:14:23+09:00 Subject: [ruby-core:19318] Re: [Feature #643] __DIR__ On Mon, Oct 13, 2008 at 2:08 PM, Ryan Davis wrote: > > On Oct 13, 2008, at 11:27 , Thomas Sawyer wrote: > >> __DIR__ >> >> This will improve readability, remove the need for extra variables to >> store this information, and at the very least, save us a good many >> keystrokes. > > yes. > > I frequently need to do: > > File.dirname(File.dirname(__FILE__)) > > so I'd like > > __DIRDIR__ > > can we also have > > __DIRDIRDIR__ > > while you're in there? No, no, no Ryan. You have it all wrong. It should be __DIR__, __PDIR__, __PPDIR__, __PP...DIR__, where 'P' stands for parent. That will save more much more typing and is more clear. -- Jim Freeze