Ruby 777

With pre-2.6 servers, the bulk API has an edge case around documents with non-ObjectID _id fields.  This pull request offers a workaround for the issue.
You could change this to the following because doing #fetch with the default value of nil is redundant. 

    missing_id = op[:u].fetch("_id", op[:q][:_id])