# Couple of questions about constant lookups

**URL:** <https://www.ruby-forum.com/t/couple-of-questions-about-constant-lookups/70826>\
**Category:** Ruby\
**Created:** [October 3, 2006, 9:30am UTC](https://www.ruby-forum.com/t/couple-of-questions-about-constant-lookups/70826 "2006-10-03T09:30:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [October 3, 2006, 9:30am UTC](https://www.ruby-forum.com/t/couple-of-questions-about-constant-lookups/70826/1 "2006-10-03T09:30:44Z")

</div>

I asked something along these lines recently (subject: “const\_defined?  
not quite in sync with const\_get ??”). I don’t think this exact case  
was addressed in that mail but I apologise if it was…

I’m wondering why the last two lines in the code snippet below result  
in different output.

– code –

module Foo; end  
class Bar; end

p Foo::Array #=\> NameError: uninitialized constant Foo::Array  
p Bar::Array #=\> warning: toplevel constant Array referenced by  
Bar::Array

– /code –

Cheers,

Chris
