-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Using the 2.2.0 version of mongoId, I am calling the from_hash method with a hash that looks similar to this:
{ 'database': 'someName', 'hosts': [[ 'hostname', 27017]] }
The problem is that, in the replset_database.rb file, the hosts key is modified (line 24). This means that after the call to the method. The hosts key looks like this:
'hosts': [ ['hostname', 27017], { :logger => ... , 'hosts' => ... } ]
Cloning the argument passed to from_hash doesn't work, because it is not a deep copy. This could be fixed by cloning the hosts key before using it.