From: Harry Kakueki Date: 2007-10-26T09:32:18+09:00 Subject: Re: Skip the first invocation e.g. skip_first { foo } On 10/26/07, Brian Adkins wrote: > Consider the following code: > > first = true > 3.times do > if first > first = false > else > puts 'foo' > end > ... > end > > I'd like to be able to do the following instead: > > 3.times do > skip_first { puts 'foo' } > ... > end > arr = %w[foo bar bat foo] arr[1..-1].each do |x| p x end puts # OR arr.each_with_index do |x,i| p x if i !=0 end If these are no good, then I am not understanding your question. Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/