Bug #17889
closed
Enumerator::Lazy#with_index should return size
Added by bjfish (Brandon Fish) over 3 years ago.
Updated over 3 years ago.
Description
The following example shows #size
returns nil
when the size
was provided to new
as 3
.
Example
p Enumerator::Lazy.new([1, 2, 3], 3){|y, v| y << v}.with_index.size
Expected Result
3
Actual Result
nil
- Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED
- Status changed from Open to Closed
- Backport changed from 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONE
ruby_3_0 20bf397f7cebd8156d76941dd54659cf9b8c8fe7 merged revision(s) fd8991f797c145615820b4c76e6b7ac5a71339ea.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0