Project

General

Profile

Actions

Feature #10880

closed

Subclassing Array from Enumerator

Added by sawa (Tsuyoshi Sawada) about 9 years ago. Updated over 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:68214]

Description

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)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0