mongodb/mongo-ruby-driver — pull request #162 by marioizquierdo (2013-02-20 03:59:49+00:00)
Title: Allow options keys to be Strings in collection.update method 

I was trying to create an update query like this:

```ruby
collection.update(
{'related_worlds.world_id' => wid},
{'$unset' => {'related_worlds.$' => ''}}
)
```
Then I realized it was only updating the first matched element, so I read around mongodb documentation and found that the option `multi: true` is what I need.

I guessed that the ruby driver would accept a third argument for the options, so I tried it:

```ruby
collection.update(
{'related_worlds.world_id' => wid},
{'$unset' => {'related_worlds.$' => ''}},
{'multi' => true}
)
```

It didn't raise any error, but it also **didn't work**.
I realized only after browsing the source code that it only works with symbols, which, in this case, was not intuitive given that the other keys `'related_worlds.world_id'` and `'$unset'` are Strings.

I think allowing those options to be either Strings or Symbols will remove friction.

In general, it would be great to use something like [ActiveSupport HashWithIndifferentAccess](http://api.rubyonrails.org/classes/ActiveSupport/HashWithIndifferentAccess.html) all around the place, but this simple change would improve at least the experience with the update method.