Skip to content

Instantly share code, notes, and snippets.

@tpope
Created September 12, 2008 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpope/10483 to your computer and use it in GitHub Desktop.
Save tpope/10483 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
sql = 'look "quotes," a \backslash, and #{:interpolation}'
puts instance_eval(%("#{sql.gsub(/[\\"]/,'\\\\\\&')}"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment