aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:10:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:10:01 +0000
commite2137aa24b8328f44c26da2fc20fcc744b9f8d8b (patch)
tree22e400d2f90f5c811a4e130ed66ddeb8b1192c77 /variable.c
parenta213d41c11dbc227f02a3bc15bca8377c3e34be9 (diff)
downloadruby-e2137aa24b8328f44c26da2fc20fcc744b9f8d8b.tar.gz
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
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
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;