Class: Continuation
- Inherits:
-
Object
- Object
- Continuation
- Defined in:
- lib/binding_of_caller.rb
Overview
:nodoc:
Class Method Summary collapse
-
.create(*args, &block) ⇒ Object
:nodoc:.
Class Method Details
.create(*args, &block) ⇒ Object
:nodoc:
2 3 4 5 6 |
# File 'lib/binding_of_caller.rb', line 2 def self.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 |