Issue #1961 has been updated by Roger Pack.
My personal preference would be __DIR__
Here's a example patch that seems to work, if it's helpful at all.
Index: prelude.rb
===================================================================
--- prelude.rb (revision 27020)
+++ prelude.rb (working copy)
@@ -22,3 +22,12 @@
}
end
end
+
+# Kernel
+
+module Kernel
+ def __DIR__
+ filename = caller[0][/^(.*):/, 1]
+ File.expand_path(File.dirname(filename))
+ end
+end
(gleaned from an old Ramaze copy).
I'd be happy to add tests or change the name or what not, as well, if so directed.
Thanks.
-rp
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1961
----------------------------------------
http://redmine.ruby-lang.org