Subject: Re: iteration the ruby way
From: sera fhwang.net
Date: Sat, 5 Feb 2005 07:15:19 +0900
References: 129686
Use join:
a = [ "a", "b", "c" ]
puts a.join( " -- " )
And while we're at it, you can use the %w( ... ) construct to quickly
make an array of strings:
puts %w( a b c ).join( " -- " )