lib/sync-defer.rb in sync-defer-0.9.3 vs lib/sync-defer.rb in sync-defer-0.9.4

- old
+ new

@@ -20,9 +20,13 @@ else $stderr.puts("SyncDefer: WARN: No reactor found. " \ "Only cool.io and eventmachine are supported.") $stderr.puts(" Called from: #{caller.last(5).inspect}") args << block if block_given? - args.map(&:call) + if args.size == 1 + args.first.call + else + args.map(&:call) + end end end end