From: Eugene Ventimiglia Date: 2001-03-01T01:51:49+09:00 Subject: [ruby-talk:11783] Re: How do I reach members from a Proc? One more thing: How do I pass parameters to @action? Code's modified below class Hello def install(&p) @action=p end def do(thing) # @action.call(thing) ? instance_eval(&@action) #???? end def help(frotz) puts "in help" + frotz.to_s end end h=Hello.new h.install {|frump| puts "in proc" + frump.to_s help } h.do("fish") > '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 >