From: "NARUSE, Yui" Date: 2010-03-25T12:27:44+09:00 Subject: [ruby-core:28970] Re: [Feature #1961] Kernel#__dir__ 2010/3/24 Charles Oliver Nutter : > This is nice but would not be backward compatible with code that depends on > __FILE__ actually being a string (any code that splits on / or builds a path > with + "../" for example. Maybe a subclass of String? Is there a down side > to that? > > class FileString < String > �def dir > � �File.dirname(self) > �end > end Why don't you use Pathname? note: Including pathname lib to core is sometimes discussed in core members. But it is not concrete yet. -- NARUSE, Yui naruse@airemix.jp