summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-17 13:23:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-17 13:23:56 +0000
commit406a9fc5cf0ff3cde3a812b283e3376634601553 (patch)
treedd7a7112393992cfca1edd347ff9c257da42a1e7
parentcdeff42cc1838fe71d562c6bd96e2437a3e90170 (diff)
documentation for Dir.exist?
* dir.c (rb_file_directory_p): move documentation for Dir.exist? from file.c so that the proper description will be shown instead of the documentation of File.directory?. [ruby-core:45685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--dir.c20
-rw-r--r--file.c12
3 files changed, 24 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 23d090496b..e0a78c4805 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 17 22:23:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dir.c (rb_file_directory_p): move documentation for Dir.exist? from
+ file.c so that the proper description will be shown instead of the
+ documentation of File.directory?. [ruby-core:45685]
+
Sun Jun 17 16:21:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
diff --git a/dir.c b/dir.c
index ac4b1c614b..ded9560528 100644
--- a/dir.c
+++ b/dir.c
@@ -2025,6 +2025,22 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
return rb_home_dir(u, rb_str_new(0, 0));
}
+#if 0
+/*
+ * call-seq:
+ * Dir.exist?(file_name) -> true or false
+ * Dir.exists?(file_name) -> true or false
+ *
+ * Returns <code>true</code> if the named file is a directory,
+ * <code>false</code> otherwise.
+ *
+ */
+VALUE
+rb_file_directory_p()
+{
+}
+#endif
+
/*
* Objects of class <code>Dir</code> are directory streams representing
* directories in the underlying file system. They provide a variety of
@@ -2073,8 +2089,8 @@ Init_Dir(void)
rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1);
- rb_define_singleton_method(rb_cDir,"exist?", rb_file_directory_p, 1); /* in file.c */
- rb_define_singleton_method(rb_cDir,"exists?", rb_file_directory_p, 1); /* in file.c */
+ rb_define_singleton_method(rb_cDir,"exist?", rb_file_directory_p, 1);
+ rb_define_singleton_method(rb_cDir,"exists?", rb_file_directory_p, 1);
rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);
diff --git a/file.c b/file.c
index bf584c843a..1eca6c7fdc 100644
--- a/file.c
+++ b/file.c
@@ -1092,18 +1092,6 @@ access_internal(const char *path, int mode)
*/
/*
- * Document-method: exist?
- *
- * call-seq:
- * Dir.exist?(file_name) -> true or false
- * Dir.exists?(file_name) -> true or false
- *
- * Returns <code>true</code> if the named file is a directory,
- * <code>false</code> otherwise.
- *
- */
-
-/*
* Document-method: directory?
*
* call-seq: