Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Enumerator::Lazy#_enumerable_drop
_enumerable_drop(p1)
enumerator.c
View on GitHub ↗
static VALUE
lazy_drop(VALUE obj, VALUE n)
{
long len = NUM2LONG(n);
VALUE argv[2];
argv[0] = sym_each;
argv[1] = n;
if (len < 0) {
rb_raise(rb_eArgError, "attempt to drop negative size");
}
return lazy_add_method(obj, 2, argv, n, rb_ary_new3(1, n), &lazy_drop_funcs);
}
Alias of #drop
Like Enumerable#drop, but chains operation to be lazy-evaluated.
See also
#drop
#_enumerable_collect_concat
#_enumerable_drop_while
#_enumerable_collect
also in
4.0 · 3.4 · 3.2 · 3.1 · 3.0