From: Kyung won Cheon Date: 2009-01-05T10:34:44+09:00 Subject: Re: about searching constant Mike Gold wrote: > An invisible parameter is passed to a block (search for cases of > specific_eval in eval.c) which is used for constant lookups. > > For A.module_eval { } and A.class_eval { }, that invisible parameter > is A. But for A.instance_eval { }, it is A's singleton class. > > The constant lies in A, not in A's singleton class. > You must be inside "class > A" (or "module A") to get the constant lookup of WHY == A::WHY. I understand it now... Thank you!! -- Posted via http://www.ruby-forum.com/.