diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2019-03-05 16:04:41 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2019-03-05 16:04:41 -0800 |
commit | bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3 (patch) | |
tree | 040de4c20837ba49faf87ac9f7251f4df0afb9af /activesupport/CHANGELOG.md | |
parent | 91ed21b304c468db8ce9fd830312c151432935d0 (diff) | |
download | rails-bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3.tar.gz rails-bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3.tar.bz2 rails-bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3.zip |
Added Array#including, Array#excluding, Enumerable#including, Enumerable#excluding
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 3f0c6fbd4e..ea84b54b3f 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,21 @@ +* Allow Array#excluding and Enumerable#excluding to deal with a passed array gracefully. + + [ 1, 2, 3, 4, 5 ].excluding([4, 5]) => [ 1, 2, 3 ] + + *DHH* + +* Renamed Array#without and Enumerable#without to Array#excluding and Enumerable#excluding, to create parity with + Array#including and Enumerable#including. Retained the old names as aliases. + + *DHH* + +* Added Array#including and Enumerable#including to conveniently enlarge a collection with more members using a method rather than an operator: + + [ 1, 2, 3 ].including(4, 5) => [ 1, 2, 3, 4, 5 ] + post.authors.including(Current.person) => All the authors plus the current person! + + *DHH* + ## Rails 6.0.0.beta2 (February 25, 2019) ## * New autoloading based on [Zeitwerk](https://github.com/fxn/zeitwerk). |