End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Enumerator::Lazy#_enumerable_grep
_enumerable_grep(p1)
enumerator.c
View on GitHub ↗
static VALUE
lazy_grep(VALUE obj, VALUE pattern)
{
const lazyenum_funcs *const funcs = rb_block_given_p() ?
&lazy_grep_iter_funcs : &lazy_grep_funcs;
return lazy_add_method(obj, 0, 0, pattern, rb_ary_new3(1, pattern), funcs);
}
Alias of #grep
Like Enumerable#grep, but chains operation to be lazy-evaluated.
See also
#grep
#_enumerable_flat_map
#_enumerable_grep_v
#_enumerable_find_all
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1