From: brandon.j.fish@... Date: 2021-05-26T17:21:59+00:00 Subject: [ruby-core:104058] [Ruby master Bug#17889] Enumerator::Lazy#with_index should return size Issue #17889 has been reported by bjfish (Brandon Fish). ---------------------------------------- Bug #17889: Enumerator::Lazy#with_index should return size https://bugs.ruby-lang.org/issues/17889 * Author: bjfish (Brandon Fish) * Status: Open * Priority: Normal * ruby -v: 3.0.0 * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- The following example shows `#size` returns `nil` when the `size` was provided to `new` as `3`. **Example** ``` ruby p Enumerator::Lazy.new([1, 2, 3], 3){|y, v| y << v}.with_index.size ``` **Expected Result** ``` ruby 3 ``` **Actual Result** ``` ruby nil ``` -- https://bugs.ruby-lang.org/ Unsubscribe: