summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:07:41 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 01:07:41 (GMT)
commita3cc3cc5c958e6e0bb9d650f396123d719c75ca3 (patch)
tree15778eae93cee1e35b6a5f6b358e80299aefeb6b /variable.c
parentbef96f5a3f7c2740dc175ea0a659e7581c761c5d (diff)
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 0966685..277edb8 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;