From: Thomas Sawyer Date: 2010-05-26T20:45:55+09:00 Subject: [ruby-core:30434] [Feature #3346] __DIR__ revisted Feature #3346: __DIR__ revisted http://redmine.ruby-lang.org/issues/show/3346 Author: Thomas Sawyer Status: Open, Priority: Normal I'd like to know why __DIR__ was rejected? I use File.dirname(__FILE__) all the time, and I frequently see others do so as well. #relative_require is helpful but it covers only one specific use case --and probably not the most common one. I am often using File.dirname(__FILE__) in build scripts, when I am loading examples for tests, and when I load output templates or other pluggable modules that reside relative to my code. For something so common, having to clutter my code with a 22 character sequence, when an perfectly obvious 7 character sequence would do semms very uncharacteristic of Ruby, which is usually quite concise. Indeed, it is not uncommon to see code that defines a constant such as DIR = File.dirname(__FILE__) when it will be used more than once because it quickly becomes an eye-sore. For these reasons I hope you will reconsider the earlier rejection. ---------------------------------------- http://redmine.ruby-lang.org