From: Robert Dober Date: 2006-09-15T02:15:11+09:00 Subject: Re: compact join with new line... ------=_Part_71112_12417223.1158254067321 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/14/06, Josselin wrote: > > I would like to compact join address elements by inserting a new line > between them > > in my class address I am using > > def to_s > [@street, @city, @country ].compact.join(" - ") > end > > but I'd like to replace " -" by a new line character to display the > full adress on 3 lines > > is it possible ? Well I hope so ;) %w{ here you go my friend}.join("\n") HTH robert joss > > > > > --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_71112_12417223.1158254067321--