From: Evan Phoenix Date: 2010-03-24T06:53:09+09:00 Subject: [ruby-core:28910] Re: [Feature #1961] Kernel#__dir__ Perhaps __FILE__ should not be a raw String object, but rather a CurrentFile object. It could have a #to_str to return the normal String so it can be used like normal, but can provide methods like #dir, where __FILE__.dir == File.dirname(__FILE__). This solves the need for __DIR__ in a very clean, object oriented way. - Evan Phoenix