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

ruby-changes:26866

From: naruse <ko1@a...>
Date: Thu, 24 Jan 2013 13:20:42 +0900 (JST)
Subject: [ruby-changes:26866] naruse:r38918 (trunk): Refix of r38916: it uses realpath

naruse	2013-01-24 13:20:33 +0900 (Thu, 24 Jan 2013)

  New Revision: 38918

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

  Log:
    Refix of r38916: it uses realpath

  Modified files:
    trunk/eval.c

Index: eval.c
===================================================================
--- eval.c	(revision 38917)
+++ eval.c	(revision 38918)
@@ -1505,10 +1505,10 @@ rb_f_callee_name(void) https://github.com/ruby/ruby/blob/trunk/eval.c#L1505
  *  call-seq:
  *     __dir__         -> string
  *
- *  Returns the absolute path of the directory of the file from which this
- *  method is called.
+ *  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.expand_path(__FILE__))</code>.
+ *  The return value equals to <code>File.dirname(File.realpath(__FILE__))</code>.
  *
  */
 static VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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