# File lib/mongo/operation/shared/result/aggregatable.rb, line 34 def aggregate_write_errors(count) return unless @replies @replies.reduce(nil) do |errors, reply| if write_errors = reply.documents.first[Error::WRITE_ERRORS] wes = write_errors.collect do |we| we.merge!('index' => count + we['index']) end (errors || []) << wes if wes end end end