Hi --

On Mon, 11 Dec 2006, Gustav Paul wrote:

> The following seems to work:
> #########
> class BlockTest
>  def process(&block)
>    @block=block
>  end
>
>  def myblock
>    instance_eval{@block}.call

No need for instance_eval there.  @block already belongs to self, and
the instance_eval just resets self to self :-)


David

-- 
                   David A. Black | dblack / wobblini.net
Author of "Ruby for Rails"   [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog)        [2] | Co-director, Ruby Central, Inc.   [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com    | [4] http://www.rubycentral.org