Actions
Feature #14625
openyield_self accepts an argument, calling to_proc
Feature #14625:
yield_self accepts an argument, calling to_proc
Status:
Open
Assignee:
-
Target version:
-
Description
Currently, yield_self doesn't accept any argument other than a block.
But there are situations where I would like to pass a method object to yield_self.
e.g.
Of course, we can get the same result with
but the order of reading/writing doesn't match the order of thinking.
My request is for yield_self to accept a proc-ish object and call to_proc on it so that we can write the code as shown below, which is more readable.
Actions