From: "cvss (Kirill Vechera)" Date: 2021-12-06T17:38:00+00:00 Subject: [ruby-core:106522] [Ruby master Bug#18390] Enumerator::Lazy#find returns invalid value Issue #18390 has been updated by cvss (Kirill Vechera). I just found that playground runs Opal, not MRI. Sorry for incorrect addressee, please close the issue. ---------------------------------------- Bug #18390: Enumerator::Lazy#find returns invalid value https://bugs.ruby-lang.org/issues/18390#change-95182 * 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: