# This is a machine-generated stub file for the NetBeans IDE Ruby Support.
#
# Many Ruby methods are "built in" which means that there is no
# Ruby source code for them. It is convenient for the IDE however to
# have these files for indexing and documentation purposes, so the following
# class definition is generated from the native implementation as a skeleton
# or stub to index.
#
# Ruby Version: "1.8.7-p72"
# Generator version: 1.0
#

#
#   
# Continuation objects are generated by
# <code>Kernel#callcc</code>. They hold a return address and execution
# context, allowing a nonlocal return to the end of the
# <code>callcc</code> block from anywhere within a program.
# Continuations are somewhat analogous to a structured version of C's
# <code>setjmp/longjmp</code> (although they contain more state, so
# you might consider them closer to threads).
#    
# For instance:
#    
#    arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ]
#    callcc{|$cc|}
#    puts(message = arr.shift)
#    $cc.call unless message =~ /Max/
#    
# <em>produces:</em>
#    
#    Freddie
#    Herbie
#    Ron
#    Max
#    
# This (somewhat contrived) example allows the inner loop to abandon
# processing early:
#    
#    callcc {|cont|
#      for i in 0..4
#        print "\n#{i}: "
#        for j in i*5...(i+1)*5
#          cont.call() if j == 17
#          printf "%3d", j
#        end
#      end
#    }
#    print "\n"
#    
# <em>produces:</em>
#    
#    0:   0  1  2  3  4
#    1:   5  6  7  8  9
#    2:  10 11 12 13 14
#    3:  15 16
# 
class Continuation
  #     cont.call(args, ...)
  #     cont[args, ...]
  #
  #
  # Invokes the continuation. The program continues from the end of the
  # <code>callcc</code> block. If no arguments are given, the original
  # <code>callcc</code> returns <code>nil</code>. If one argument is
  # given, <code>callcc</code> returns it. Otherwise, an array
  # containing <i>args</i> is returned.
  #
  #    callcc {|cont|  cont.call }           #=> nil
  #    callcc {|cont|  cont.call 1 }         #=> 1
  #    callcc {|cont|  cont.call 1, 2, 3 }   #=> [1, 2, 3]
  #
  #
  def call(args)
    # This is just a stub for a builtin Ruby method.
    # See the top of this file for more info.
  end

  #     cont.call(args, ...)
  #     cont[args, ...]
  #
  #
  # Invokes the continuation. The program continues from the end of the
  # <code>callcc</code> block. If no arguments are given, the original
  # <code>callcc</code> returns <code>nil</code>. If one argument is
  # given, <code>callcc</code> returns it. Otherwise, an array
  # containing <i>args</i> is returned.
  #
  #    callcc {|cont|  cont.call }           #=> nil
  #    callcc {|cont|  cont.call 1 }         #=> 1
  #    callcc {|cont|  cont.call 1, 2, 3 }   #=> [1, 2, 3]
  #
  #
  def call(args)
    # This is just a stub for a builtin Ruby method.
    # See the top of this file for more info.
  end


end
