From: "Jesús Gabriel y Galán" Date: 2009-02-10T18:18:32+09:00 Subject: Re: a better way to do this job? On Tue, Feb 10, 2009 at 10:11 AM, Zhenning Guan wrote: > topics.each do |f| > times +=1 > puts f.title > if times > 4 > break > > > a little ugly, doesn't it? topics[0,5].each do |f| puts f.title end # if you need the variable "times" to have the same value as above: # times = topics[0,5].size Jesus.