From: matz@... (Yukihiro Matsumoto) Date: 2003-08-14T00:12:41+09:00 Subject: Re: Nested class/module namespace Hi, In message "Re: Nested class/module namespace" on 03/08/13, "Nathaniel Talbott" writes: |> Because it's not nested at all. It is confusing for me, if |> it behaves like nesting. Nested constant scope was |> introduced only for one purpose. |> |> module M |> class C |> C.foo # want to access C here. |> end |> end | |Oops... I guess I've been using it incorrectly :-). So it's not for this |reason? | | module M | class C | M::FOO # want to access M here. | end | end I didn't express my idea correctly. M too should be covered by nested constant scope. |Well, this seems a little confusing to me: | | class M::C | def C.m | end | end | | => NameError: uninitialized constant M::C::C | |If it had nested scope, this wouldn't happen, right? Right, but you were going to define M::C, not plain C, were you? matz.