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

ruby-changes:24069

From: nobu <ko1@a...>
Date: Sun, 17 Jun 2012 22:24:09 +0900 (JST)
Subject: [ruby-changes:24069] nobu:r36120 (trunk): documentation for Dir.exist?

nobu	2012-06-17 22:23:56 +0900 (Sun, 17 Jun 2012)

  New Revision: 36120

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

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/dir.c
    trunk/file.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36119)
+++ ChangeLog	(revision 36120)
@@ -1,3 +1,9 @@
+Sun Jun 17 22:23:53 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
Index: dir.c
===================================================================
--- dir.c	(revision 36119)
+++ dir.c	(revision 36120)
@@ -2025,7 +2025,23 @@
     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
  *  ways to list directories and their contents. See also
@@ -2073,8 +2089,8 @@
 
     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);
Index: file.c
===================================================================
--- file.c	(revision 36119)
+++ file.c	(revision 36120)
@@ -1092,18 +1092,6 @@
  */
 
 /*
- * 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:

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

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