>  -----Original Message-----
>  From: Wayne Vucenic [mailto:nightphotos / gmail.com] 
>  Sent: Friday, 5 November 2004 12:12
>  To: ruby-talk ML
>  Subject: Re: Cleaner way to do this?
>
>  How about
>
>  [1, 2, 3, 4, 5].each_with_index do |x, i|
>    if i == 0
>      print x
>    else
>      print ", ",x
>    end
>  end

That's what I initially suggested :-).

However, he felt it was a bit crazy to do the test every time, given the
large size of the array.

H.


************************************************************************

If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. 

Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.  The views expressed here do not necessarily represent those of Hyperion.

For more information about Hyperion, please visit our Web site at www.hyperion.com