Feature #8098

Add __DIR__ to compliment __FILE__

Added by Hal Brodigan almost 2 years ago. Updated about 1 year ago.



There should be a DIR constant to compliment FILE.

Related issues

Duplicates Ruby trunk - Feature #3346: __DIR__ revisted Closed 05/26/2010


#1 Updated by Charlie Somerville almost 2 years ago

IIRC (({__DIR__})) has already been shot down because of concerns that introducing a new keyword might break things.

However I would like to see a (({__file__})) method to complement (({__dir__})), (({__method__})), etc.

#2 Updated by Eric Hodel almost 2 years ago

  • Status changed from Open to Rejected

#3 Updated by Hal Brodigan about 1 year ago

I concur with Charlie Somerville. It does seem asymetrical that there is a __FILE__ constant, but no __file__ method.

Also available in: Atom PDF