Use a sized enumerator with #yield_self
The #yield_self Enumerator instance always has a #count of
1. I think it might be nice to provide a lazy #size of
1 to match the #count for parity.
42.yield_self.count #=> 1 42.yield_self.size #=> nil
42.yield_self.count #=> 1 42.yield_self.size #=> 1
Updated by shyouhei (Shyouhei Urabe) over 2 years ago
Hanmac (Hans Mackowiak) wrote:
shyouhei (Shyouhei Urabe) wrote:
The patch seems okay to me, but honestly I don't see any practical use case of it. Do you nedd this?
the pr was already merged, but this ticket was not closed because of that
Thank you. Issue updated to refer the changeset.