From c6c67254fb17b3196a7b0d3fda4650f6b20a467d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 17 Dec 2019 17:17:07 +0900 Subject: Added rb_warn_deprecated --- hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 27d1d03848..79f69f63be 100644 --- a/hash.c +++ b/hash.c @@ -2245,7 +2245,7 @@ rb_hash_key(VALUE hash, VALUE value) static VALUE rb_hash_index(VALUE hash, VALUE value) { - rb_warn("Hash#index is deprecated; use Hash#key"); + rb_warn_deprecated("Hash#index", "Hash#key"); return rb_hash_key(hash, value); } @@ -5861,7 +5861,7 @@ env_key(VALUE dmy, VALUE value) static VALUE env_index(VALUE dmy, VALUE value) { - rb_warn("ENV.index is deprecated; use ENV.key"); + rb_warn_deprecated("ENV.index", "ENV.key"); return env_key(dmy, value); } -- cgit v1.2.3