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

ruby-changes:71565

From: Jeremy <ko1@a...>
Date: Thu, 31 Mar 2022 03:40:44 +0900 (JST)
Subject: [ruby-changes:71565] 79b59fee16 (master): Update NEWS for proc autosplat change

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

From 79b59fee16b33527eba348b63c9233d58e396c8c Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Wed, 30 Mar 2022 11:39:27 -0700
Subject: Update NEWS for proc autosplat change

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

diff --git a/NEWS.md b/NEWS.md
index 0be02b3030..47bf71b561 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -20,6 +20,17 @@ Note that each entry is kept to a minimum, see links for details. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L20
     end
     ```
 
+* A proc that accepts a single positional argument and keywords will
+  no longer autosplat. [[Bug #18633]]
+
+  ```ruby
+  proc{|a, **k| a}.call([1, 2])
+  # Ruby 3.1 and before
+  # => 1
+  # Ruby 3.2 and after
+  # => [1, 2]
+  ```
+
 * Constant assignment evaluation order for constants set on explicit
   objects has been made consistent with single attribute assignment
   evaluation order.  With this code:
@@ -204,3 +215,4 @@ The following deprecated APIs are removed. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L215
 [Feature #18571]: https://bugs.ruby-lang.org/issues/18571
 [Feature #18585]: https://bugs.ruby-lang.org/issues/18585
 [Feature #18598]: https://bugs.ruby-lang.org/issues/18598
+[Bug #18633]:     https://bugs.ruby-lang.org/issues/18633
-- 
cgit v1.2.1


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

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