From: Clemens Hintze Date: 2000-04-07T19:16:49+02:00 Subject: [ruby-talk:02377] Iterator into array Hi Dave, sorry but I do not even understand your question. Could you explain more a little bit? What is 'iteratorMethod { |i| result << i }' supposed to do? \cle Dave Thomas writes: > > Dave's stupid question of the week: > > Given an iterator method, how can I get the results expressed as an > array? I could do: > > result = [] > iteratorMethod { |i| result << i } > > But this seems ugly - there must be a more functional way of doing this. Any > ideas? > > > Dave > -- Clemens Hintze mailto: c.hintze@gmx.net