[#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:106184] [Ruby master Feature#11256] anonymous block forwarding
From:
"bughit (bug hit)" <noreply@...>
Date:
2021-11-19 20:48:17 UTC
List:
ruby-core #106184
Issue #11256 has been updated by bughit (bug hit).
> I strongly agree with matz on this, methods taking a block should be clear about it, including in the parameters.
I never said I disagree. Requiring a naked `&` in the signature to signal "block allowed" and perhaps `&!` for `block required` would be better. But "block allowed" will break lots of code so I don't see it happening. So as long as "block allowed" is the default, forwarding should be possible. `...` forwards blocks with 0 indication that the method takes a block, should it be illegal without a naked `&` in the signature?
> Please have some understanding that people implementing Ruby might know better about this and complexity.
This is my feature request, so please don't tell me not to advocate for my vision.
----------------------------------------
Feature #11256: anonymous block forwarding
https://bugs.ruby-lang.org/issues/11256#change-94792
* Author: bughit (bug hit)
* Status: Closed
* 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:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>