summaryrefslogtreecommitdiff
path: root/NEWS.md
diff options
context:
space:
mode:
authorosyo-manga <manga.osyo@gmail.com>2021-10-28 18:21:27 +0900
committerGitHub <noreply@github.com>2021-10-28 18:21:27 +0900
commitd51ba1e1be3ecbe5a02e4463f151e178de1c2a6e (patch)
treeb216fdf34892ee3217ea0c75cc0fee3bde9c7d43 /NEWS.md
parente76e1d3ce4bf65b3c7f56e09dd5f51b79538df18 (diff)
Add changes Enumerable#each_cons and each_slice in NEWS [ci skip]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5044 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'NEWS.md')
-rw-r--r--NEWS.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/NEWS.md b/NEWS.md
index efa6174370..c95a0a3c1d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -118,6 +118,18 @@ Outstanding ones only.
* 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#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 #18172]: https://bugs.ruby-lang.org/issues/18172
[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