From: Farrel Lifson Date: 2008-02-22T18:56:09+09:00 Subject: Re: Reduce three line method to one line On 22/02/2008, Giant Cranes wrote: > def get_category_data(category_id) > rows = [] > FasterCSV.parse(@data) { |row| rows << row if row[0] == category_id } > rows > end FasterCSV.parse(@data).select{|row| row[0] == category_id}