On May 4, 2006, at 9:16 AM, Marco Bottaro wrote:

> I keep finding myself iterating and collecting this way. Would you  
> care
> please to illustrate with an example?

Well:

   arr = [ ]
   whatever.each { |e| arr << e }

Is just a long way to say:

   whatever.to_a

for any Enumerable.  Also, map() and inject() are generally other  
options for avoiding these kinds of constructs.

Show us an example of where you have used it and I bet we can help  
you improve it.

James Edward Gray II