Actions
Feature #13562
closedUse a sized enumerator with #yield_self
Feature #13562:
Use a sized enumerator with #yield_self
Status:
Closed
Assignee:
-
Target version:
-
Description
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.
Currently:
42.yield_self.count #=> 1
42.yield_self.size #=> nil
I propose:
42.yield_self.count #=> 1
42.yield_self.size #=> 1
Actions