View Single Post
  #6 (permalink)  
Old 03-31-2008, 09:50 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Ruby BuiltIn functions

callcc
callcc {| cont | block } -> anObject


Generates a Continuation object, which it passes to the associated block. Performing a cont .call will cause the callcc to return (as will falling through the end of the block). The value returned by the callcc is the value of the block, or the value passed to cont .call. See Continuation on page 294 for more details. Also see Kernel::throw for an alternative mechanism for unwinding a call stack.
__________________
Shaalini.S
Be the Best of Whatever you are...
Reply With Quote