[前][次][番号順一覧][スレッド一覧]

ruby-changes:26867

From: nari <ko1@a...>
Date: Thu, 24 Jan 2013 14:35:15 +0900 (JST)
Subject: [ruby-changes:26867] nari:r38919 (trunk): fix documents. __dir__ is a shorthand File.realdirpath(__FILE__).

nari	2013-01-24 14:35:05 +0900 (Thu, 24 Jan 2013)

  New Revision: 38919

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38919

  Log:
    fix documents. __dir__ is a shorthand File.realdirpath(__FILE__).

  Modified files:
    trunk/NEWS
    trunk/eval.c

Index: eval.c
===================================================================
--- eval.c	(revision 38918)
+++ eval.c	(revision 38919)
@@ -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.dirname(File.realpath(__FILE__))</code>.
+ *  The return value equals to <code>File.realdirpath(__FILE__)</code>.
  *
  */
 static VALUE
Index: NEWS
===================================================================
--- NEWS	(revision 38918)
+++ NEWS	(revision 38919)
@@ -74,8 +74,7 @@ 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__ which returns the absolute path of the
-        directory of the file from which this method is called.
+      * added Kernel#__dir__, a shorthand for File.realdirpath(__FILE__).
       * 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/

[前][次][番号順一覧][スレッド一覧]