From: Dominik Honnef Date: 2009-03-05T05:03:31+09:00 Subject: Re: Array to string --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On [Thu, 05.03.2009 04:56], Fresh Mix wrote: > If I have a array: a =3D [ "a", "a", "b", "b", "c" ] >=20 > How can I get a string: "a, a, b, b, c" By using Array#join >>> irb >> a =3D [ "a", "a", "b", "b", "c" ] =3D> ["a", "a", "b", "b", "c"] >> a.join(", ") =3D> "a, a, b, b, c" --=20 Dominik Honnef dominikho@gmx.net --24zk1gE8NUlDmwG9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkmu3uMACgkQePZ2jI1LDteW9ACfcl8d0kKux/m/mcbsEtinrVvh ZtQAoK5OLNG5na9AZDDTuvDkGbmW23K2 =BUU6 -----END PGP SIGNATURE----- --24zk1gE8NUlDmwG9--