From: merch-redmine@... Date: 2021-05-27T19:43:32+00:00 Subject: [ruby-core:104067] [Ruby master Bug#17889] Enumerator::Lazy#with_index should return size Issue #17889 has been updated by jeremyevans0 (Jeremy Evans). Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED I didn't bisect, but this is probably related to commit:85e43e1dfecef69b935c48c235cc20f21bd4f0d4, as it affects 2.7 and 3.0 but not 2.6. I'll see if there is a way to fix this. ---------------------------------------- Bug #17889: Enumerator::Lazy#with_index should return size https://bugs.ruby-lang.org/issues/17889#change-92241 * Author: bjfish (Brandon Fish) * Status: Open * Priority: Normal * ruby -v: 3.0.0 * Backport: 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED ---------------------------------------- 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: