From 6054e6d65e1da1362971ee2f7eaa11ea018a0663 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Sep 2016 01:10:01 +0000 Subject: variable.c: fix deprecated constant message * variable.c (rb_const_search): warn with the actual class/module name which defines the deprecated constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- variable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 277edb83b4..2465212ab9 100644 --- a/variable.c +++ b/variable.c @@ -2263,7 +2263,7 @@ rb_const_search(VALUE klass, ID id, int exclude, int recurse, int visibility) rb_name_err_raise("private constant %2$s::%1$s referenced", tmp, ID2SYM(id)); } - rb_const_warn_if_deprecated(ce, klass, id); + rb_const_warn_if_deprecated(ce, tmp, id); value = ce->value; if (value == Qundef) { if (am == tmp) break; -- cgit v1.2.3