diff options
author | Jeremy Evans <code@jeremyevans.net> | 2021-11-18 12:44:19 -0800 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2021-11-18 14:17:57 -0800 |
commit | 4adb012926f8bd6011168327d8832cf19976de40 (patch) | |
tree | 9457020694002d0a0c07ced988a1d09c79fa74e6 /NEWS.md | |
parent | ea02b93bb95a42439631606269659dffc1981883 (diff) |
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
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5051
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |