From: Brian Candler Date: 2007-04-03T14:44:38+09:00 Subject: Re: Last iteration condition On Tue, Apr 03, 2007 at 12:00:09PM +0900, Mike wrote: > How could I know that current iteration is the last in the series? > For example: > > [1, 2, 3, 4, 5, 3, 4].each do |element| > print element.to_s > print ',' if !LAST > end Try thread around http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/72518 for some sample implementations.