diff options
author | Pavel Pravosud <pavel@pravosud.com> | 2017-02-23 14:43:56 -0800 |
---|---|---|
committer | Pavel Pravosud <pavel@pravosud.com> | 2017-02-23 15:24:22 -0800 |
commit | b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17 (patch) | |
tree | 3aeb9e6cd1f3b2517485c2c510010576d5ebabe2 /activesupport/lib/active_support | |
parent | 18afe45d7c564e5b9bc453bbe06a2aa78aebe246 (diff) | |
download | rails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.tar.gz rails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.tar.bz2 rails-b74c7e939ae5bec5c7b98c456a3b9ceb56a0ca17.zip |
Make HWIA#compact not return nil when no nils
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 2 |
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. |