From bb54d0ae4cafaecfecb2299d7acacaa642afce5c Mon Sep 17 00:00:00 2001
From: shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 11 Jan 2013 00:58:08 +0000
Subject: * insns.def (defineclass): private constants should not be accessed  
 by scoped module definitions.  The bug was introduced in r38495.

* test/ruby/test_module.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 338f299ddf..85c0a38471 100644
--- a/insns.def
+++ b/insns.def
@@ -949,7 +949,7 @@ defineclass
 	/* find klass */
 	if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
 	    klass = VM_DEFINECLASS_SCOPED_P(flags) ?
-		rb_const_get_at(klass, id) : rb_public_const_get_at(klass, id);
+		rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
 	    /* already exist */
 	    if (!RB_TYPE_P(klass, T_MODULE)) {
 		rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
-- 
cgit v1.2.3

