lib/sync-defer.rb
# assume we would always require 'rest-core' in root fiber
assume we would always require 'rest-core' in root fiber
assume we would always require ' rest - core ' in root fiber
def fallback message, *args, &block
    $stderr.puts("SyncDefer: WARN: #{message}")
    $stderr.puts("           Falling back to run the computation directly.")
    $stderr.puts("           Called from: #{caller.first(5).inspect}")
    args << block if block_given?
    if args.size == 1
      args.first.call
    else
      args.map(&:call)
    end
  end
def fallback message , * args , & block $stderr . puts ( "SyncDefer: WARN: #{message}" ) $stderr . puts ( "           Falling back to run the computation directly." ) $stderr . puts ( "           Called from: #{caller.first(5).inspect}" ) args << block if block_given? if args . size == 1 args . first . call else args . map ( & :call ) end end
assume we would always require 'rest-core' in root fiber
assume we would always require ' rest - core ' in root fiber
message
<not_specific>
args
<not_specific>
block
<not_specific>