From: Thomas Sawyer Date: 2008-10-14T02:02:02+09:00 Subject: [ruby-core:19313] [Bug #642] __DIR__ Bug #642: __DIR__ http://redmine.ruby-lang.org/issues/show/642 Author: Thomas Sawyer Status: Open, Priority: Normal 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. ---------------------------------------- http://redmine.ruby-lang.org