From: matz@... (Yukihiro Matsumoto) Date: 2001-02-28T15:01:19+09:00 Subject: [ruby-talk:11749] Re: How do I reach members from a Proc? Hi, In message "[ruby-talk:11745] How do I reach members from a Proc?" on 01/02/28, "Eugene Ventimiglia" writes: |Here's a reduced version of what I'm trying to do: |h=Hello.new |h.install { # self here is different from h. # block does not affect the value of self. | puts "in proc" | help |} |h.do So how about the following? |class Hello | def install(&p) | @action=p | end | def do > @action.call(self) | end | def help | puts "in help" | end |end | |h=Hello.new >h.install {|s| | puts "in proc" > s.help |} |h.do matz.