From: Caleb Clausen on
On 6/21/10, Roger Pack <rogerpack2005(a)gmail.com> wrote:
> * __DIR__ for 1.9.3
> $50

I wrote a __DIR__ macro as one of the examples in RubyMacros. Idunno
if that's what you really have in mind. See
http://github.com/coatl/rubymacros/blob/master/example/__dir__.rb

It expands __DIR__ to File.dirname(__FILE__). Other drawbacks:

* it requires RubyMacros, with all the slowness that come with that
* RubyMacros isn't compatible with all the new 1.9 constructions
(tho some will work)

There's also the method implementation which uses caller (as you know,
since you were one of the people who came up with it).

Are these implementations not to your taste? If not, why so?

I might be able to knock down some other of your bounties as well.

From: Roger Pack on
> It expands __DIR__ to File.dirname(__FILE__). Other drawbacks:

> Are these implementations not to your taste? If not, why so?

Sure works for me :) e-mail me.

> I might be able to knock down some other of your bounties as well.

Go for it--several have already been knocked off by your previous work,
some before I added them "oh yeah Caleb already did something like that"
--
Posted via http://www.ruby-forum.com/.