summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 14:58:41 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 14:58:41 +0000
commita669f1f992105981efd4bb891d34cbf53b05696a (patch)
tree1b75d3c5f376bd54a51e26a837d3771e7632b979 /variable.c
parentdce01373fd866e8ac77ed3d3b1b148044d2259af (diff)
merge revision(s) 56117,56118: [Backport #12742]
* variable.c (rb_const_search): raise with the actual class/module name which defines the private constant. * 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/branches/ruby_2_3@56259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index 3690c1bddd..618aa852bd 100644
--- a/variable.c
+++ b/variable.c
@@ -2238,9 +2238,9 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, int visibility)
while ((ce = rb_const_lookup(tmp, id))) {
if (visibility && RB_CONST_PRIVATE_P(ce)) {
rb_name_err_raise("private constant %2$s::%1$s referenced",
- klass, ID2SYM(id));
+ 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;