From: Yukihiro Matsumoto Date: 2008-08-25T18:28:17+09:00 Subject: Re: Why NameError ?? Hi, In message "Re: Why NameError ??" on Mon, 25 Aug 2008 17:54:00 +0900, Kyung won Cheon writes: |module M1 | class A | end |end | |module M2 | class A | end | p A # M2::A | class B | p A # M2::A | end |end | |module M3 | include M1 | p A # M1::A | class B | p A # NameError (M3::B::A) | end |end Constant look-up goes self -> surrounding -> super (until Object). So, from M3, look-up goes M3 -> M1 (A defined here). From M3::B, B -> M3 -> Object (no A found). matz.