Show the deprecated name in the warning
Fixed up a58bbd6a512d95ca010d8bebae4fe590400c1413.
This commit is contained in:
parent
d827c718db
commit
67f616c523
2
dir.c
2
dir.c
@ -3337,7 +3337,7 @@ rb_file_directory_p(void)
|
|||||||
static VALUE
|
static VALUE
|
||||||
rb_dir_exists_p(VALUE obj, VALUE fname)
|
rb_dir_exists_p(VALUE obj, VALUE fname)
|
||||||
{
|
{
|
||||||
rb_warn_deprecated("", "Dir.exist?");
|
rb_warn_deprecated("Dir.exists?", "Dir.exist?");
|
||||||
return rb_file_directory_p(obj, fname);
|
return rb_file_directory_p(obj, fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
file.c
2
file.c
@ -1786,7 +1786,7 @@ rb_file_exists_p(VALUE obj, VALUE fname)
|
|||||||
RTEST(rb_class_inherited_p(obj, rb_cFile)))) {
|
RTEST(rb_class_inherited_p(obj, rb_cFile)))) {
|
||||||
s = "File.exist?";
|
s = "File.exist?";
|
||||||
}
|
}
|
||||||
rb_warn_deprecated("", s);
|
rb_warn_deprecated("%.*ss?", s, (int)(strlen(s)-1), s);
|
||||||
return rb_file_exist_p(obj, fname);
|
return rb_file_exist_p(obj, fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user