diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-03-03 08:59:38 +0900 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2018-03-02 16:40:55 -0800 |
commit | acbcec8ea869849f98213fea5e554bb3a82fea61 (patch) | |
tree | 4eda1100b0360ba544d9118c6700a1317df283c0 /guides | |
parent | b1a9cee83082d6c7a58d87d06055c86fcdbc7644 (diff) | |
download | rails-acbcec8ea869849f98213fea5e554bb3a82fea61.tar.gz rails-acbcec8ea869849f98213fea5e554bb3a82fea61.tar.bz2 rails-acbcec8ea869849f98213fea5e554bb3a82fea61.zip |
Deprecate `active_support/core_ext/hash/compact`
Ruby 2.4+ provides `Hash#compact` and `Hash#compact!` natively,
so `active_support/core_ext/hash/compact` is no longer necessary.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 73b24b900a..75ad343613 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -2818,16 +2818,6 @@ The method `with_indifferent_access` returns an `ActiveSupport::HashWithIndiffer NOTE: Defined in `active_support/core_ext/hash/indifferent_access.rb`. -### Compacting - -The methods `compact` and `compact!` return a Hash without items with `nil` value. - -```ruby -{a: 1, b: 2, c: nil}.compact # => {a: 1, b: 2} -``` - -NOTE: Defined in `active_support/core_ext/hash/compact.rb`. - Extensions to `Regexp` ---------------------- |