Logo

Programming-Idioms

History of Idiom 53 > diff from v12 to v13

Edit summary for version 13 by :

Version 12

2015-09-03, 11:34:31

Version 13

2015-09-03, 15:36:04

Idiom #53 Join a list of strings

Concatenate elements of string list x joined by the separator ", " to create a single string y.

Idiom #53 Join a list of strings

Concatenate elements of string list x joined by the separator ", " to create a single string y.

Code
y = list.join(", ")
Doc URL
http://ruby-doc.org/core-2.2.3/Array.html#method-i-join