From: kjana@... (YANAGAWA Kazuhisa) Date: 2000-04-08T03:29:49+09:00 Subject: [ruby-talk:02380] Re: Iterator into array In message Dave@thomases.com writes: > Given an iterator method, how can I get the results expressed as an > array? I could do: > > result = [] > iteratorMethod { |i| result << i } If your iterator is defined on a collection includes Enumerable (eg. Array), you can use --- what is one subject these days --- Enumerable#collect. Or you prefer a method like Array#filter for its effectiveness. # Or do I miss the point? -- kjana@os.xaxon.ne.jp April 8, 2000 Dreams come true --- excepting yours.