From: Kent Dahl Date: 2003-05-17T03:20:55+09:00 Subject: Re: procs and context repeatr wrote: > def live(&block) > instance_eval { Proc.new.call } Why not just instance_eval( &block ) which appears to work fine for me. The variable block points to a Proc of the external block already due to the &-prefix. Or are you getting at something more complex? As for why it your original code doesn't work: instance_eval { Proc.new.call } instance_eval only changes the context of the given block (which contains Proc.new.call), but Proc.new.call fetches another block/Proc (&block) from the outside of the method, and _that_ Proc does NOT get its context changed by instance_eval. Why should it? It would make recursive use of Procs a nightmare. HTH -- (\[ Kent Dahl ]/)_ _~_ __[ http://www.stud.ntnu.no/~kentda/ ]___/~ ))\_student_/(( \__d L b__/ NTNU - graduate engineering - 5. year ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)