aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPavel Pravosud <pavel@pravosud.com>2017-02-23 14:43:56 -0800
committerPavel Pravosud <pavel@pravosud.com>2017-02-23 15:24:22 -0800
commitb74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17 (patch)
tree3aeb9e6cd1f3b2517485c2c510010576d5ebabe2 /activesupport/lib
parent18afe45d7c564e5b9bc453bbe06a2aa78aebe246 (diff)
downloadrails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.tar.gz
rails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.tar.bz2
rails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.zip
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.