From 4adb012926f8bd6011168327d8832cf19976de40 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 18 Nov 2021 12:44:19 -0800 Subject: Anonymous block forwarding allows a method to forward a passed block to another method without having to provide a name for the block parameter. Implements [Feature #11256] Co-authored-by: Yusuke Endoh mame@ruby-lang.org Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org --- NEWS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'NEWS.md') diff --git a/NEWS.md b/NEWS.md index 2e4cbc6742..3e8035714b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,15 @@ Note that each entry is kept to a minimum, see links for details. ## Language changes +* The block arguments can be now be anonymous, if the block will + only be passed to another method. [[Feature #11256]] + + ```ruby + def foo(&) + bar(&) + end + ``` + * Pin operator now takes an expression. [[Feature #17411]] ```ruby @@ -412,6 +421,7 @@ See [the repository](https://github.com/ruby/error_highlight) in detail. [Bug #4443]: https://bugs.ruby-lang.org/issues/4443 [Feature #6210]: https://bugs.ruby-lang.org/issues/6210 +[Feature #11256]: https://bugs.ruby-lang.org/issues/11256 [Feature #12194]: https://bugs.ruby-lang.org/issues/12194 [Feature #12495]: https://bugs.ruby-lang.org/issues/12495 [Feature #14256]: https://bugs.ruby-lang.org/issues/14256 -- cgit v1.2.3