From: Peter McLain Date: 2010-03-09T02:08:15+09:00 Subject: Re: Class vs Module in constant lookup Since I didn't get a good answer here, I posted the question on ruby- core, and it looks like I've caught the attention of the core team. So, if you're interested in the resolution, you should follow: [ruby-core:28482] Question on scoped constant resolution Class vs Module On Mar 3, 2010, at 11:01 AM, Peter McLain wrote: > Constant lookup behaves differently if there is a class versus a > module in the name: > > XYZ = 10 > > module M > end > > class C > end > > p defined? M::XYZ # => nil > p defined? C::XYZ # => "constant" > > Is this difference intended? If so, what is the rationale? -- Peter McLain peter.mclain@gemstone.com