From: Dave Thomas Date: 2001-02-28T14:55:38+09:00 Subject: [ruby-talk:11748] Re: How do I reach members from a Proc? "Eugene Ventimiglia" writes: > Here's a reduced version of what I'm trying to do: class Hello def install(&p) @action=p end def do # @action.call instance_eval(&@action) #<<< end def help puts "in help" end end h=Hello.new h.install { puts "in proc" help } h.do 'instance_eval' effectively evaluates the block in the context of its receiver (in this case 'h'). Without it, the block is run in it's original context. (http://www.rubycentral.com/book/ref_c_object.html#instance_eval) Regards Dave