# Problem with Module/Class name resolution

**URL:** <https://www.ruby-forum.com/t/problem-with-module-class-name-resolution/86064>\
**Category:** Ruby\
**Created:** [February 19, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/problem-with-module-class-name-resolution/86064 "2007-02-19T17:06:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlockney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Post date:** [February 19, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/problem-with-module-class-name-resolution/86064/1 "2007-02-19T17:06:07Z")

</div>

Hi,

consider the following:

module A  
X = 1  
end

p A::X # =\> 1

module B  
include A  
end

p B::X # =\> 1

module A  
module Help  
p X # =\> 1  
end  
end

module B  
module Help  
p X # =\> NameError: uninitialized constant B::Help::X  
end  
end

Why does referencing X from A, B, and A::Help work but not from  
B::Help although A is included in B? Is there a work-around to make  
this work?

Bye,  
Thomas
