Project

General

Profile

Feature #642

__DIR__

Added by trans (Thomas Sawyer) about 11 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:19313]

Description

=begin
There is an snippet of code found in many Ruby scripts, especially testing scripts. It is...

File.dirname(FILE)

For something so common --and something that can not, by its very nature, be put into a reusable method, it is annoying to have to repeatedly calculate the current scripts location. So I respectfully request that a future version of Ruby provide a built-in reference that can used instead:

DIR

This will improve readability, remove the need for extra variables to store this information, and at the very least, save us many a keystroke.
=end


Related issues

Related to Ruby master - Feature #1961: Kernel#__dir__Closed08/19/2009Actions

History

#1

Updated by shyouhei (Shyouhei Urabe) about 11 years ago

  • Status changed from Open to Rejected

=begin
Not a bug.

Can you open another ticket with tracker named "Feature" ?
=end

#2

Updated by trans (Thomas Sawyer) about 11 years ago

=begin

On Oct 13, 1:51 pm, Shyouhei Urabe redm...@ruby-lang.org wrote:

Issue #642 has been updated by Shyouhei Urabe.

Status changed from Open to Rejected

Not a bug.

Can you open another ticket with tracker named "Feature" ?

Yes. Of course. My apologies for overlooking it.

It there no way to change a bug into a feature, btw? Well, there's a
feature request for the Redmine folks.

Thanks,
T.

=end

#3

Updated by matz (Yukihiro Matsumoto) about 11 years ago

=begin
Hi,

In message "Re: [ruby-core:19316] Re: Bug #642 DIR"
on Tue, 14 Oct 2008 03:30:50 +0900, Trans transfire@gmail.com writes:

|> Can you open another ticket with tracker named "Feature" ?

|It there no way to change a bug into a feature, btw? Well, there's a
|feature request for the Redmine folks.

Of course there is. Done.

                        matz.

=end

Also available in: Atom PDF