Issue #10880 has been updated by Marc-Andre Lafortune.


> they should be very close

They *are* very close:

    Enumerator.instance_methods - Array.instance_methods
    # => [:with_index, :with_object, :next_values, :peek_values, :next, :peek, :feed, :rewind] 

Which method(s) in there do you claim to use frequently?

----------------------------------------
Feature #10880: Subclassing Array from Enumerator
https://bugs.ruby-lang.org/issues/10880#change-51582

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
It often happens that I want to use a method from the `Enumerator` class on an array, and so I frequently use `Array#to_enum`. Since `Array` and `Enumerator` share the same parent `Enumerable`, they should be very close. I think it would be convenient if `Array` inherits from `Enumerator`. (Perhaps the same thing can be said for `Hash` too)



-- 
https://bugs.ruby-lang.org/