ruby-changes:26872
From: nobu <ko1@a...>
Date: Thu, 24 Jan 2013 15:55:33 +0900 (JST)
Subject: [ruby-changes:26872] nobu:r38924 (trunk): re-fix documents
nobu 2013-01-24 15:55:24 +0900 (Thu, 24 Jan 2013) New Revision: 38924 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38924 Log: re-fix documents File.realdirpath(path) is not a shorthand for File.dirname(File.realpath(path)), just does not err if the last component does not exist. Modified files: trunk/NEWS trunk/eval.c Index: eval.c =================================================================== --- eval.c (revision 38923) +++ eval.c (revision 38924) @@ -1508,7 +1508,7 @@ rb_f_callee_name(void) https://github.com/ruby/ruby/blob/trunk/eval.c#L1508 * Returns the canonicalized absolute path of the directory of the file from * which this method is called. It means symlinks in the path is resolved. * If <code>__FILE__</code> is <code>nil</code>, it returns <code>nil</code>. - * The return value equals to <code>File.realdirpath(__FILE__)</code>. + * The return value equals to <code>File.dirname(File.realpath(__FILE__))</code>. * */ static VALUE Index: NEWS =================================================================== --- NEWS (revision 38923) +++ NEWS (revision 38924) @@ -74,7 +74,8 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L74 * Kernel * added method: * added Kernel#Hash conversion method like Array() or Float(). - * added Kernel#__dir__, a shorthand for File.realdirpath(__FILE__). + * added Kernel#__dir__ which returns the absolute path of the + directory of the file from which this method is called. * added Kernel#caller_locations which returns an array of frame information objects. * extended method: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/