From: Brian Adkins Date: 2007-10-26T08:30:10+09:00 Subject: Re: Skip the first invocation e.g. skip_first { foo } On Oct 25, 6:50 pm, Gary Wright wrote: > On Oct 25, 2007, at 6:40 PM, Brian Adkins wrote: > > > Consider the following code: > > > first = true > > 3.times do > > if first > > first = false > > else > > puts 'foo' > > end > > ... > > end > > 3.times do |i| > print '2nd or more: ' unless i.zero? > puts "iteration: #{i}" > end I guess I wasn't clear enough. This should work in any type of iteration, so a loop index may not be available. For example: foo.each do |bar| skip_first { ... } ... end