Gary Wright wrote in post #991944: > On Apr 9, 2011, at 8:03 AM, Vahagn Hayrapetyan wrote: >> e = file.enum_for(:each) #just the default >> e.each do |entry| #now the enumerator works >> puts entry >> end >> >> end >> end >> end > > > You are doing lots of unnecessary work there. Since MatchData#captures > returns an array and Array already defines each, you don't need to > create > any enumerator at all to iterate through the #captures array: > As the op said: >>> This is what I've done just to >>> experiment: -- Posted via http://www.ruby-forum.com/.