[ruby-talk:02385] Re: Iterator into array

From: mengx@...
Date: 2000-04-07 20:17:35 UTC
List: ruby-talk #2385
> True, but that then means that every iterator would have to implement
> the test. It would seem better to make the implementation part of the
> general set of collections, rather than of the methods that fill them.
> 

Maybe 

result = Array.new(iterator) 
would work if Array can check its type.


-Ted

In This Thread

Prev Next