Details
Description
There's a commonly used approach to extract options from method arguments using Array#extract_options!
Example:
require 'active_support'
|
|
def foo(*args)
|
args.extract_options!
|
end
|
|
foo(1, 1, { :some => 'hash' }) # => { :some => 'hash' }
|
However when using `bson` gem inside a project the example above returns {}.
ActiveSupport requires BSON::OrderedHash to implement method #extractable_options? to support options extraction. See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/array/extract_options.rb#L7
Expected result: It should still be possible to use Array#extract_options! if a gem has dependency on `bson`