Thanks ... there it is, plain as day, on page 345 of PickAxe 2nd edition.


On Thu, 6 Jan 2005 08:35:14 +0900, Jamis Buck <jamis_buck / byu.edu> wrote:
> On 08:17 Thu 06 Jan     , Carlos wrote:
> > [Howard Lewis Ship <hlship / gmail.com>, 2005-01-06 00.11 CET]
> > > Is there a way to return control from the block to the method?
> >
> > next
> >
> > Good luck.
> 
> To elaborate a little more:
> 
>   a = proc { |i| next i+1 }
>   p a.call(5)
> 
> Hope that helps. I can understand why 'return' behaves like it does,
> but there are times I wish there was a more intuitive keyword for
> returning a value from a block. 'next' just feels wrong to me. :(
> 
> - Jamis
> 
> --
> Jamis Buck
> jamis_buck / byu.edu
> http://www.jamisbuck.org/jamis
> ------------------------------
> "I am Victor of Borge. You will be assimil-nine-ed."
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com