From: "yhara (Yutaka HARA)" Date: 2013-02-27T10:48:44+09:00 Subject: [ruby-core:52976] [ruby-trunk - Bug #7975] Why __dir__, not __DIR__ Issue #7975 has been updated by yhara (Yutaka HARA). That is becuase __dir__ is a method, whereas __FILE__ is not. $ ruby -ve 'p Kernel.methods' ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1] [:sprintf, :format, :Integer, :Float, :String, :Array, :Hash, :warn, :raise, :fail, :global_variables, :__method__, :__callee__, :__dir__, :eval, ..... __dir__ is prefered to avoid adding a new keyword (see #1961.) ---------------------------------------- Bug #7975: Why __dir__, not __DIR__ https://bugs.ruby-lang.org/issues/7975#change-37128 Author: yimutang (Joey Zhou) Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: 2.0 There's a __FILE__ in Ruby 1.x, no __file__ Why __dir__ in Ruby 2.0 is downcase? It's not consistent. -- http://bugs.ruby-lang.org/