Class: Continuation

Inherits:
Object
  • Object
show all
Defined in:
lib/binding_of_caller.rb

Overview

to satisfy rdoc

Class Method Summary collapse

Class Method Details

.create(*args, &block) ⇒ Object

:nodoc:


5
6
7
8
9
# File 'lib/binding_of_caller.rb', line 5

def Continuation.create(*args, &block) # :nodoc:
  cc = nil; result = callcc {|c| cc = c; block.call(cc) if block and args.empty?}
  result ||= args
  return *[cc, *result]
end