summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:34:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:34:26 +0000
commit5e9e13f04f17a88cf41675fb510700db5940625f (patch)
treeb6d4061001651f13e3f466ac737e34186d13ec63 /file.c
parent931feba48be6f5079b6cdcd8cef869f83b9f0253 (diff)
downloadruby-5e9e13f04f17a88cf41675fb510700db5940625f.tar.gz
ruby-5e9e13f04f17a88cf41675fb510700db5940625f.tar.xz
ruby-5e9e13f04f17a88cf41675fb510700db5940625f.zip
* file.c (Init_File): File.exists? revived.
* dir.c (Init_Dir): Dir.exists? again. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index bda8210e2..c9cf386c0 100644
--- a/file.c
+++ b/file.c
@@ -980,6 +980,7 @@ eaccess(const char *path, int mode)
*
* 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.
@@ -1160,7 +1161,7 @@ rb_file_chardev_p(VALUE obj, VALUE fname)
/*
* call-seq:
* File.exist?(file_name) => true or false
- * File.exists?(file_name) => true or false (obsolete)
+ * File.exists?(file_name) => true or false
*
* Return <code>true</code> if the named file exists.
*/
@@ -4442,6 +4443,7 @@ Init_File(void)
define_filetest_function("directory?", rb_file_directory_p, 1);
define_filetest_function("exist?", rb_file_exist_p, 1);
+ define_filetest_function("exists?", rb_file_exist_p, 1);
define_filetest_function("readable?", rb_file_readable_p, 1);
define_filetest_function("readable_real?", rb_file_readable_real_p, 1);
define_filetest_function("world_readable?", rb_file_world_readable_p, 1);