file.c: warn File.exists?
* file.c (rb_file_exists_p): warn deprecated name. [Bug #9041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
274e50c189
commit
058d55ad2c
@ -1,3 +1,7 @@
|
|||||||
|
Tue Oct 22 00:06:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_file_exists_p): warn deprecated name. [Bug #9041]
|
||||||
|
|
||||||
Mon Oct 21 23:57:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Oct 21 23:57:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c (load_encoding): should preserve outer errinfo, so that
|
* encoding.c (load_encoding): should preserve outer errinfo, so that
|
||||||
|
9
file.c
9
file.c
@ -1397,6 +1397,13 @@ rb_file_exist_p(VALUE obj, VALUE fname)
|
|||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE
|
||||||
|
rb_file_exists_p(VALUE obj, VALUE fname)
|
||||||
|
{
|
||||||
|
rb_warning("File.exists? is deprecated name, use File.exist? instead");
|
||||||
|
return rb_file_exist_p(obj, fname);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* File.readable?(file_name) -> true or false
|
* File.readable?(file_name) -> true or false
|
||||||
@ -5579,7 +5586,7 @@ Init_File(void)
|
|||||||
|
|
||||||
define_filetest_function("directory?", rb_file_directory_p, 1);
|
define_filetest_function("directory?", rb_file_directory_p, 1);
|
||||||
define_filetest_function("exist?", rb_file_exist_p, 1);
|
define_filetest_function("exist?", rb_file_exist_p, 1);
|
||||||
define_filetest_function("exists?", rb_file_exist_p, 1);
|
define_filetest_function("exists?", rb_file_exists_p, 1);
|
||||||
define_filetest_function("readable?", rb_file_readable_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("readable_real?", rb_file_readable_real_p, 1);
|
||||||
define_filetest_function("world_readable?", rb_file_world_readable_p, 1);
|
define_filetest_function("world_readable?", rb_file_world_readable_p, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user