Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created November 22, 2009 22:45
Show Gist options
  • Save BenHall/240773 to your computer and use it in GitHub Desktop.
Save BenHall/240773 to your computer and use it in GitHub Desktop.
String format in Ruby
str = "a%sb%sc%s"
str % ['_', '/', '.']
=> "a_b/c."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment