Skip to content

Instantly share code, notes, and snippets.

@clm-a
Created August 16, 2011 16:07
Show Gist options
  • Save clm-a/1149434 to your computer and use it in GitHub Desktop.
Save clm-a/1149434 to your computer and use it in GitHub Desktop.
Join multiple lines with a different separator
"toto\ntiti".lines.map{|l| l.strip}.to_a.join(", ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment