mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
Use rb_warn_deprecated
for File.exists?
and Dir.exists?
This commit is contained in:
parent
b66d7d9be5
commit
a58bbd6a51
5 changed files with 5 additions and 32 deletions
2
dir.c
2
dir.c
|
@ -3498,7 +3498,7 @@ rb_file_directory_p(void)
|
|||
static VALUE
|
||||
rb_dir_exists_p(VALUE obj, VALUE fname)
|
||||
{
|
||||
rb_warning("Dir.exists? is a deprecated name, use Dir.exist? instead");
|
||||
rb_warn_deprecated("", "Dir.exist?");
|
||||
return rb_file_directory_p(obj, fname);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue