Actions
Feature #13333
openblock to yield
Status:
Open
Assignee:
-
Target version:
-
Description
Currently, blocks can take a block by do |&block| end
construct.
But the only way to pass a block or a bloc argument is making a Proc
and calling Proc#call
with a blockarg.
I think yield
should take a block or a block argument now.
https://github.com/ruby/ruby/compare/trunk...nobu:feature/yield-blockarg
Updated by duerst (Martin Dürst) over 7 years ago
Out of curiosity: What's the use case(s)?
Updated by shevegen (Robert A. Heiler) over 7 years ago
Out of curiosity: What's the use case(s)?
Could be simply due to reciprocity. :)
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
I think it would make generator happy.
Actions
Like0
Like0Like0Like0