ruby-changes:2899
From: ko1@a...
Date: 21 Dec 2007 12:34:37 +0900
Subject: [ruby-changes:2899] matz - Ruby:r14390 (trunk): * file.c (Init_File): File.exists? revived.
matz 2007-12-21 12:34:26 +0900 (Fri, 21 Dec 2007) New Revision: 14390 Modified files: trunk/ChangeLog trunk/dir.c trunk/file.c Log: * file.c (Init_File): File.exists? revived. * dir.c (Init_Dir): Dir.exists? again. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/file.c?r1=14390&r2=14389 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14390&r2=14389 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/dir.c?r1=14390&r2=14389 Index: ChangeLog =================================================================== --- ChangeLog (revision 14389) +++ ChangeLog (revision 14390) @@ -1,3 +1,9 @@ +Fri Dec 21 12:32:08 2007 Yukihiro Matsumoto <matz@r...> + + * file.c (Init_File): File.exists? revived. + + * dir.c (Init_Dir): Dir.exists? again. + Fri Dec 21 12:26:36 2007 Koichi Sasada <ko1@a...> * compile.c: remove "illegal". Index: dir.c =================================================================== --- dir.c (revision 14389) +++ dir.c (revision 14390) @@ -1904,6 +1904,7 @@ 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_cFile,"fnmatch", file_s_fnmatch, -1); rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1); Index: file.c =================================================================== --- file.c (revision 14389) +++ file.c (revision 14390) @@ -980,6 +980,7 @@ * * 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 @@ /* * 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 @@ 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml