diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-30 23:33:20 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-28 18:36:30 +0900 |
commit | bf97415c02b11a8949f715431aca9eeb6311add2 (patch) | |
tree | b3cba65dfb9ed0b7af246dd5d6f4f4e92b043fc8 /file.c | |
parent | 0a47896d201b91555d2216bc62125825b6b220a1 (diff) | |
download | ruby-bf97415c02b11a8949f715431aca9eeb6311add2.tar.gz |
Removed deprecated Dir.exists? and File.exists?
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -1786,23 +1786,6 @@ rb_file_exist_p(VALUE obj, VALUE fname) return Qtrue; } -/* :nodoc: */ -static VALUE -rb_file_exists_p(VALUE obj, VALUE fname) -{ - const char *s = "FileTest#exist?"; - if (obj == rb_mFileTest) { - s = "FileTest.exist?"; - } - else if (obj == rb_cFile || - (RB_TYPE_P(obj, T_CLASS) && - RTEST(rb_class_inherited_p(obj, rb_cFile)))) { - s = "File.exist?"; - } - rb_warn_deprecated("%.*ss?", s, (int)(strlen(s)-1), s); - return rb_file_exist_p(obj, fname); -} - /* * call-seq: * File.readable?(file_name) -> true or false @@ -6703,7 +6686,6 @@ 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_exists_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); |