aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:07:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:07:41 +0000
commita213d41c11dbc227f02a3bc15bca8377c3e34be9 (patch)
tree15778eae93cee1e35b6a5f6b358e80299aefeb6b /variable.c
parent51b6ab76e83173ca57eded7ce14094e125ee0b73 (diff)
downloadruby-a213d41c11dbc227f02a3bc15bca8377c3e34be9.tar.gz
variable.c: fix private constant message
* variable.c (rb_const_search): raise with the actual class/module name which defines the private constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56117 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 0966685690..277edb83b4 100644
--- a/variable.c
+++ b/variable.c
@@ -2261,7 +2261,7 @@ rb_const_search(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);
value = ce->value;