From 67f616c523023080c037784ff49739c76f108741 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 7 Apr 2020 12:43:34 +0900 Subject: Show the deprecated name in the warning Fixed up a58bbd6a512d95ca010d8bebae4fe590400c1413. --- dir.c | 2 +- file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dir.c b/dir.c index eaabc0a789..303e291bd9 100644 --- a/dir.c +++ b/dir.c @@ -3337,7 +3337,7 @@ rb_file_directory_p(void) static VALUE 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); } diff --git a/file.c b/file.c index 6d8adac4c4..e14a658fa9 100644 --- a/file.c +++ b/file.c @@ -1786,7 +1786,7 @@ rb_file_exists_p(VALUE obj, VALUE fname) RTEST(rb_class_inherited_p(obj, rb_cFile)))) { s = "File.exist?"; } - rb_warn_deprecated("", s); + rb_warn_deprecated("%.*ss?", s, (int)(strlen(s)-1), s); return rb_file_exist_p(obj, fname); } -- cgit v1.2.3