diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-06 10:45:20 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-06 10:45:20 -0700 |
commit | 8f6cfd9e9f919658ab2d15306b585b37a9c72351 (patch) | |
tree | 8b3334f9bcbcec5885b08e6aba7c99e7ef89d198 /activesupport | |
parent | 9c47b874d112414df7f80f9ed852adb48ba6d268 (diff) | |
download | rails-8f6cfd9e9f919658ab2d15306b585b37a9c72351.tar.gz rails-8f6cfd9e9f919658ab2d15306b585b37a9c72351.tar.bz2 rails-8f6cfd9e9f919658ab2d15306b585b37a9c72351.zip |
Revert "Improve the performance of HWIDA `select` and `reject`"
This reverts commit 9c47b874d112414df7f80f9ed852adb48ba6d268.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index c7477b9ff4..4f71f13971 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -237,12 +237,12 @@ module ActiveSupport def deep_symbolize_keys; to_hash.deep_symbolize_keys! end def to_options!; self end - def select(*) - super.with_indifferent_access + def select(*args, &block) + dup.tap { |hash| hash.select!(*args, &block) } end - def reject(*) - super.with_indifferent_access + def reject(*args, &block) + dup.tap { |hash| hash.reject!(*args, &block) } end # Convert to a regular hash with string keys. |