Hi,

Dave Thomas <Dave / thomases.com> wrote:
>    class Dave
>       def initialize(&block)
>          ??
>       end
> 
>       def fred
>          print "In fred\n"
>       end
>    end

> the object created by Dave.new? I've tried instance_eval, but I don't
> seem to be able to get it so work with a variable containing a block.

Really?
Following seems to work as you want.

       def initialize(&block)
          instance_eval(&block)
       end

---
Masaki Fukushima