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#uniq
lazy.uniq → lazy_enumerator
lazy.uniq { |item| block } → lazy_enumerator
enumerator.c
View on GitHub ↗
static VALUE
lazy_uniq(VALUE obj)
{
const lazyenum_funcs *const funcs =
rb_block_given_p() ? &lazy_uniq_iter_funcs : &lazy_uniq_funcs;
return lazy_add_method(obj, 0, 0, Qnil, Qnil, funcs);
}
Like Enumerable#uniq, but chains operation to be lazy-evaluated.