diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 12:18:55 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 12:18:55 +0000 |
commit | efd36678e6041593a6b9cd64bdbe4318f1e7ad0e (patch) | |
tree | 1ea37573185dbb508777fb7be1aa4e2d9a19983f /file.c | |
parent | bb03a2db5cb88f30e91f23750b31f523d39f6b35 (diff) | |
download | ruby-efd36678e6041593a6b9cd64bdbe4318f1e7ad0e.tar.gz |
[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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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" * |