[前][次][番号順一覧][スレッド一覧]

ruby-changes:69491

From: osyo-manga <ko1@a...>
Date: Thu, 28 Oct 2021 18:21:55 +0900 (JST)
Subject: [ruby-changes:69491] d51ba1e1be (master): Add changes Enumerable#each_cons and each_slice in NEWS [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=d51ba1e1be

From d51ba1e1be3ecbe5a02e4463f151e178de1c2a6e Mon Sep 17 00:00:00 2001
From: osyo-manga <manga.osyo@g...>
Date: Thu, 28 Oct 2021 18:21:27 +0900
Subject: Add changes Enumerable#each_cons and each_slice in NEWS [ci skip]

---
 NEWS.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/NEWS.md b/NEWS.md
index efa6174370a..c95a0a3c1dd 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -118,6 +118,18 @@ Outstanding ones only. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L118
 
     * 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. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L415
 [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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]