Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Enumerator::Lazy#select
lazy.select { |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);
}
Like Enumerable#select, but chains operation to be lazy-evaluated.