-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
Environment:apps with gem `rails` >= 2.5
Affects apps using rails >= 5.2
Rails 5.2 [dropped the
ActiveSupport::Hash#slice|https://github.com/rails/rails/commit/a524c955bfcce118da0ecb21affe28e2a102a54b] in favor of ruby's 2.5+ `Hash#slice`
This breaks the behaviour of `BSON::Document#slice` which relies on the call of `convert_key` method.
Example:
```
doc = mc.find(name: 'John').first
doc.class
=> BSON::Document
doc.slice(:name)
=> {}
doc.slice('name')
=>
```