Project

General

Profile

Feature #8098

Add __DIR__ to compliment __FILE__

Added by Hal Brodigan over 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
[ruby-core:53427]

Description

There should be a DIR constant to compliment FILE.


Related issues

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

History

#1 [ruby-core:53428] Updated by Charlie Somerville over 3 years ago

=begin
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.
=end

#2 [ruby-core:53429] Updated by Eric Hodel over 3 years ago

  • Status changed from Open to Rejected

#3 [ruby-core:60009] Updated by Hal Brodigan almost 3 years 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