aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman+no-recruiters@gmail.com>2017-02-23 20:34:25 -0600
committerGitHub <noreply@github.com>2017-02-23 20:34:25 -0600
commit9f46b5f096758e537fb1b7928a191a7b9b566550 (patch)
tree8a0d0d385d50935aa0b7e1beb902df90b3a36b01 /activesupport/lib
parent4ed704740b7ccc8ac9cfb7b5ec62d55ac178ec97 (diff)
parentb74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17 (diff)
downloadrails-9f46b5f096758e537fb1b7928a191a7b9b566550.tar.gz
rails-9f46b5f096758e537fb1b7928a191a7b9b566550.tar.bz2
rails-9f46b5f096758e537fb1b7928a191a7b9b566550.zip
Merge pull request #28138 from rwz/rwz/hwia-compact
Make HWIA#compact not return nil when no nils
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index 79e7feaf47..f9b269ad69 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -270,7 +270,7 @@ module ActiveSupport
end
def compact
- dup.compact!
+ dup.tap(&:compact!)
end
# Convert to a regular hash with string keys.