From: Bertram Scharpf Date: 2005-04-29T07:10:55+09:00 Subject: instance/class_eval Hi, experts, how can I find out what my current class context is? I say: class C ; end C.instance_eval { def f ; "f" ; end } C.f #=> "f" class D ; end D.class_eval { def f ; "f" ; end } D.new.f #=> "f" Obviously the method will be put into another context either. I would like to be able to ask what the context is _before_ I define the method. `self' seems to be the same in both cases. Sorry, it's my itch that I want to know the whole truth. Thanks in advance. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de