Another block question. Is there any way to re-parent a Proc? For
example
class Dave
def initialize(&block)
??
end
def fred
print "In fred\n"
end
end
Dave.new {
fred
}
Is there a magic incantation at the '??'s above which would cause the
block containing the call to 'fred' to be evaluated with self set to
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.
Thanks
Dave