diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-04-02 17:28:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 17:28:50 -0400 |
commit | 736c7d5995265e5fe004658a10f6fe38a49a31bd (patch) | |
tree | cb943e8f279b614b8f3ab5c18ed4841bfbdb0ce6 /activesupport/lib/active_support/core_ext | |
parent | d03177ffbccb5b30217448d526f1e9aa1fa24297 (diff) | |
parent | 49598c0638b8f8afeb10b20cf64ff83a2ea1d8b2 (diff) | |
download | rails-736c7d5995265e5fe004658a10f6fe38a49a31bd.tar.gz rails-736c7d5995265e5fe004658a10f6fe38a49a31bd.tar.bz2 rails-736c7d5995265e5fe004658a10f6fe38a49a31bd.zip |
Merge pull request #35771 from timoschilling/hash-speed-improvements
Hash / HashWithIndifferentAccess speed improvements
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/except.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/except.rb b/activesupport/lib/active_support/core_ext/hash/except.rb index 6258610c98..5013812460 100644 --- a/activesupport/lib/active_support/core_ext/hash/except.rb +++ b/activesupport/lib/active_support/core_ext/hash/except.rb @@ -10,7 +10,7 @@ class Hash # This is useful for limiting a set of parameters to everything but a few known toggles: # @person.update(params[:person].except(:admin)) def except(*keys) - dup.except!(*keys) + slice(*self.keys - keys) end # Removes the given keys from hash and returns it. |