From: Jenn Fo Date: 2013-07-30T22:02:02+09:00 Subject: Re: Question about arrays/hash 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? -- Posted via http://www.ruby-forum.com/.