Add changes Enumerable#each_cons and each_slice in NEWS [ci skip]
This commit is contained in:
parent
e76e1d3ce4
commit
d51ba1e1be
Notes:
git
2021-10-28 18:22:00 +09:00
Merged: https://github.com/ruby/ruby/pull/5044 Merged-By: nobu <nobu@ruby-lang.org>
13
NEWS.md
13
NEWS.md
@ -118,6 +118,18 @@ Outstanding ones only.
|
|||||||
|
|
||||||
* Enumerable#tally now accepts an optional hash to count. [[Feature #17744]]
|
* Enumerable#tally now accepts an optional hash to count. [[Feature #17744]]
|
||||||
|
|
||||||
|
* Enumerable#each_cons and each_slice to return a receiver. [[GH-1509]]
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
[1, 2, 3].each_cons(2){}
|
||||||
|
# 3.0 => nil
|
||||||
|
# 3.1 => [1, 2, 3]
|
||||||
|
|
||||||
|
[1, 2, 3].each_slice(2){}
|
||||||
|
# 3.0 => nil
|
||||||
|
# 3.1 => [1, 2, 3]
|
||||||
|
```
|
||||||
|
|
||||||
* Enumerator::Lazy
|
* Enumerator::Lazy
|
||||||
|
|
||||||
* Enumerator::Lazy#compact is added. [[Feature #17312]]
|
* Enumerator::Lazy#compact is added. [[Feature #17312]]
|
||||||
@ -403,4 +415,5 @@ See [the repository](https://github.com/ruby/error_highlight) in detail.
|
|||||||
[Feature #18029]: https://bugs.ruby-lang.org/issues/18029
|
[Feature #18029]: https://bugs.ruby-lang.org/issues/18029
|
||||||
[Feature #18172]: https://bugs.ruby-lang.org/issues/18172
|
[Feature #18172]: https://bugs.ruby-lang.org/issues/18172
|
||||||
[Feature #18229]: https://bugs.ruby-lang.org/issues/18229
|
[Feature #18229]: https://bugs.ruby-lang.org/issues/18229
|
||||||
|
[GH-1509]: https://github.com/ruby/ruby/pull/1509
|
||||||
[GH-4815]: https://github.com/ruby/ruby/pull/4815
|
[GH-4815]: https://github.com/ruby/ruby/pull/4815
|
||||||
|
Loading…
x
Reference in New Issue
Block a user