Method not available on this version
This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
new(*args)
public
Generates a new enumerator
object that iterates over the elements of given enumerable objects in
sequence.
e = Enumerator::Chain.new(1..3, [4, 5])
e.to_a
e.size
static VALUE
enum_chain_initialize(VALUE obj, VALUE enums)
{
struct enum_chain *ptr;
rb_check_frozen(obj);
TypedData_Get_Struct(obj, struct enum_chain, &enum_chain_data_type, ptr);
if (!ptr) rb_raise(rb_eArgError, "unallocated chain");
ptr->enums = rb_obj_freeze(enums);
ptr->pos = -1;
return obj;
}