Actions
Bug #18390
closedEnumerator::Lazy#find returns invalid value
Bug #18390:
Enumerator::Lazy#find returns invalid value
Description
There is a regression bug in #find
# 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
Actions