diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-09-03 14:43:33 +0700 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2011-09-03 14:43:33 +0700 |
commit | 9984266c041e1079a09140f9307fc1ca13858988 (patch) | |
tree | 077b80e77f01524b84dd5dcacda86c26d031b197 /activesupport/lib/active_support/ordered_hash.rb | |
parent | 36f1612c34577225d1f71c368e70c234d5197707 (diff) | |
download | rails-9984266c041e1079a09140f9307fc1ca13858988.tar.gz rails-9984266c041e1079a09140f9307fc1ca13858988.tar.bz2 rails-9984266c041e1079a09140f9307fc1ca13858988.zip |
Make `ActiveSupport::OrderedHash` extractable when using `Array#extract_options!`
`ActiveSupport::OrderedHash` is actually a subclass of the hash, so it does make sense that it should be extractable from the array list.
Diffstat (limited to 'activesupport/lib/active_support/ordered_hash.rb')
-rw-r--r-- | activesupport/lib/active_support/ordered_hash.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 7f70628933..0264133581 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -47,6 +47,11 @@ module ActiveSupport self end + # Returns true to make sure that this hash is extractable via <tt>Array#extract_options!</tt> + def extractable_options? + true + end + # Hash is ordered in Ruby 1.9! if RUBY_VERSION < '1.9' |