class Concurrent::Promises::ZipFuturesPromise

def on_resolvable(resolved_future, index)

def on_resolvable(resolved_future, index)
  all_fulfilled = true
  values        = ::Array.new(@Resolutions.size)
  reasons       = ::Array.new(@Resolutions.size)
  @Resolutions.each_with_index do |internal_state, i|
    fulfilled, values[i], reasons[i] = internal_state.result
    all_fulfilled                    &&= fulfilled
  end
  if all_fulfilled
    resolve_with FulfilledArray.new(values)
  else
    resolve_with PartiallyRejected.new(values, reasons)
  end
end