Project

General

Profile

Actions

Feature #8098

closed

Add __DIR__ to compliment __FILE__

Added by postmodern (Hal Brodigan) about 11 years ago. Updated about 10 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:53427]

Description

There should be a DIR constant to compliment FILE.


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #3346: __DIR__ revistedClosedyhara (Yutaka HARA)05/26/2010Actions

Updated by Anonymous about 11 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

Updated by drbrain (Eric Hodel) about 11 years ago

  • Status changed from Open to Rejected

Updated by postmodern (Hal Brodigan) about 10 years ago

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0