Joel VanderWerf wrote:
> Michel Demazure wrote:
>> In short, is there a ruby way to execute a parameter-less block with a
>> given receiver ?
> 
> pr = proc {p self}
> 2.instance_eval &pr
> => 2
> 
> Is that what you're looking for?

Of course, you're right : "newbox.instance_eval &block if block" works.
Many thanks !

M
-- 
Posted via http://www.ruby-forum.com/.