From: Mike Gold Date: 2009-01-02T18:26:39+09:00 Subject: Re: about searching constant Kyung won Cheon wrote: > class A > WHY = "I don't know why!!" Umm ... You already posted this question, and I answered it. Did you not like the answer? http://www.ruby-forum.com/topic/170583 Also as Brian mentioned, module_eval/class_eval works. 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. -- Posted via http://www.ruby-forum.com/.