From: "cvss (Kirill Vechera)" Date: 2021-12-06T17:35:38+00:00 Subject: [ruby-core:106520] [Ruby master Bug#18390] Enumerator::Lazy#find returns invalid value Issue #18390 has been updated by cvss (Kirill Vechera). File ruby_bug.png added I'm not sure about build parameters, I found this bug at the ruby playground https://try.ruby-lang.org/ I'm attaching a screenshot. ---------------------------------------- Bug #18390: Enumerator::Lazy#find returns invalid value https://bugs.ruby-lang.org/issues/18390#change-95180 * Author: cvss (Kirill Vechera) * Status: Open * Priority: Normal * ruby -v: 3.0.2 * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- There is a regression bug in `#find` ```ruby # RUBY_VERSION 3.0.2 [1, 2, 3, 4].lazy.find(&:even?) # => nil (ERROR!), expected 2 [1, 2, 3, 4].find(&:even?).find(&:even?) # => 2 # RUBY_VERSION 2.4.1 [1, 2, 3, 4].lazy.find(&:even?) # => 2 [1, 2, 3, 4].find(&:even?) # => 2 ``` ---Files-------------------------------- ruby_bug.png (8.8 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: