mongodb/mongo-ruby-driver — pull request #457 by estolfo (2014-07-17 21:17:21+00:00)
Title: Inject an order value into spec documents

This is necessary to keep track of the order in which ops are defined by the user when doing a bulk write.

The BulkWrite object may split up operations into different messages to the server or reorder the operations. The error message returned by the server will refer to operations with indexes, but the indexes don't exactly map to the order in which the user defined the op.

I put this on the slicable module because the :ord key needs to be added to each element in the array at #slicable_key and is only relevant to ops that are slicable.