-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Trivial - P5
-
Affects Version/s: 2.5.3
-
Component/s: Docs
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The documentation provides incorrect incorrect information on Mongo::Client#use.
#use(name) ⇒ Mongo::Client
Use the database with the provided name. This will switch the current database the client is operating on.
This is incorrect. The #use method does not switch the current database the client is operating on. Instead, it creates a new client that does use the new database and returns it.
There appears to be no way to actually switch a client to a new database once created.
I also suggest reconsidering the method name since the name itself is misleading in this regard, even if the documentation itself is fixed to reflect what the driver actually does.