Skip to content

Instantly share code, notes, and snippets.

@acook
Created September 10, 2013 22:36
Show Gist options
  • Save acook/6516744 to your computer and use it in GitHub Desktop.
Save acook/6516744 to your computer and use it in GitHub Desktop.
interp = 'blah blah'
text = "something \n something #{interp}"
puts text #=> "something \n something blah blah"
text = 'something \n something #{interp}'
puts text #=> "something \\n something \#{interp}"
text = %Q{something \n something #{interp}}
puts text #=> "something \n something blah blah"
text = %q{something \n something #{interp}}
puts text #=> "something \\n something \#{interp}"
something
something blah blah
something \n something #{interp}
something
something blah blah
something \n something #{interp}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment