summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-15 12:18:55 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-15 12:18:55 +0000
commitefd36678e6041593a6b9cd64bdbe4318f1e7ad0e (patch)
tree1ea37573185dbb508777fb7be1aa4e2d9a19983f /file.c
parentbb03a2db5cb88f30e91f23750b31f523d39f6b35 (diff)
[DOC] File#path result can be inaccurate
* file.c(rb_file_path): [DOC] Note that the pathname returned by this method can be inaccurate, for instance file gets moved, renamed, deleted or is created with File::TMPFILE option. Relates to [Feature #13568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index c576c85c0a..b234910d5d 100644
--- a/file.c
+++ b/file.c
@@ -372,6 +372,9 @@ apply2files(void (*func)(const char *, VALUE, void *), int argc, VALUE *argv, vo
* Returns the pathname used to create <i>file</i> as a string. Does
* not normalize the name.
*
+ * The pathname may not point the file corresponding to <i>file</i>.
+ * e.g. file has been moved, deleted, or created with <code>File::TMPFILE</code> option.
+ *
* File.new("testfile").path #=> "testfile"
* File.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx"
*