End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Enumerator::Lazy#filter
lazy.filter { |obj| block } → lazy_enumerator
enumerator.c
View on GitHub ↗
static VALUE
lazy_select(VALUE obj)
{
if (!rb_block_given_p()) {
rb_raise(rb_eArgError, "tried to call lazy select without a block");
}
return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_select_funcs);
}
Alias of #select
Like Enumerable#select, but chains operation to be lazy-evaluated.