From: Ruby Talk Date: 2008-05-02T04:31:28+09:00 Subject: Is there some way to execute a block within an arbitrary lexical scope? Is there some way to execute a block within a certain lexical scope? Let's say the scope I want is inside B: module A class B # .. wanna get in here end end And I wanted something like: method_returning_B_in_lexical_scope_of_A.class_eval do ... end As most of you know 'A::B.class_eval' does not cut it, since A would not be in the nesting. The obvious reason I want this is to take advantage of the nesting for lookups. Thanks for any ideas! -- Ara Vartanian