From: "Jesús Gabriel y Galán" Date: 2013-07-30T22:36:28+09:00 Subject: Re: Question about arrays/hash On Tue, Jul 30, 2013 at 3:02 PM, Jenn Fo wrote: > unknown wrote in post #1117123: >> Am 30.07.2013 14:40, schrieb Jenn Fo: >>> drive. I would appreciate any tips on what I should be doing! :D >>> drive =[] >>> f = >>> /([0-9]{1,2}[a-zA-Z]{1,2}:[0-9]{1,2}:[0-9]{1,2})(.*)Failed(.*)/.match(line) >>> drive << f.captures[0] if f >>> end >>> critical "Failed Drive: #{drive}" >>> end >> >> The problem is that you reset `drive' to an empty array in >> each iteration. >> >> Regards, >> Marcus > > Ah! How should I do it correctly? Initialize drive to an empty array before the loop. Jesus.