mongodb/mongo-ruby-driver — pull request #219 by k-rudy (2013-07-02 10:49:42+00:00)
Title: RUBY-641: BSON::OrderedHash should allow options extraction using Array#extract_options!

Jira ticket: https://jira.mongodb.org/browse/RUBY-641

There's a commonly used approach to extract options from method arguments using ```Array#extract_options!```

Example:
``` ruby
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