From: Sebastian Hungerecker Date: 2008-03-05T21:00:09+09:00 Subject: Re: collect with index? Tim Conner wrote: > simple question:  how can I do a collect with index? In 1.8: require 'enumerator'; foo.to_enum(:each_with_index).collect {|x,i| } In 1.9: foo.collect.with_index {|x,i| } HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826