[#106341] [Ruby master Bug#18369] users.detect(:name, "Dorian") as shorthand for users.detect { |user| user.name == "Dorian" } — dorianmariefr <noreply@...>
Issue #18369 has been reported by dorianmariefr (Dorian Mari辿).
14 messages
2021/11/30
[#106351] [Ruby master Bug#18371] Release branches (release information in general) — "tenderlovemaking (Aaron Patterson)" <noreply@...>
Issue #18371 has been reported by tenderlovemaking (Aaron Patterson).
7 messages
2021/11/30
[ruby-core:106138] [Ruby master Feature#11256] anonymous block forwarding
From:
"mame (Yusuke Endoh)" <noreply@...>
Date:
2021-11-18 14:00:41 UTC
List:
ruby-core #106138
Issue #11256 has been updated by mame (Yusuke Endoh).
@matz accepted this, but said that the formal argument must explicitly receive a anonymous block parameter, i.e.
```
def foo(&) = bar(&) # OK
def foo = bar(&) # NG
```
In the future, matz wants to make it more explicit whether a method accepts a block or not.
@jeremyevans0 Could you remove my diff from your PR?
----------------------------------------
Feature #11256: anonymous block forwarding
https://bugs.ruby-lang.org/issues/11256#change-94736
* Author: bughit (bug hit)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
since capturing a block into a proc is slow: foo(&block)
and creating chains of blocks is kind of ugly and ultimately also inefficient: foo{yield}
why not allow block forwarding without capturing: foo(&) foo(1, 2, &)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>