mongodb/mongo-ruby-driver — pull request #190 by TylerBrock (2013-04-23 18:42:22+00:00)
Title: RUBY-583: fix for first admin user on MongoDB 2.2

This was originally part of the changes included in RUBY-577 but I think it belongs with RUBY-583.

Adding the first admin user to enable authentication in MongoDB 2.2 causes the subsequent get last error command to fail. Our fix is identical to that of the python driver implementation here:

https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/database.py#L645-653