From: sera@... Date: 2005-02-05T07:30:17+09:00 Subject: Re: iteration the ruby way I'd probably use Enumerable#each_with_index. ary = [ 1, 2, 3, 4 ] ary.each_with_index { |elt, i| if i < ary.size - 1 puts elt else puts elt * 10 end } which will output: 1 2 3 40