Skip to content

Instantly share code, notes, and snippets.

@bonkydog
Created November 17, 2012 01:00
Show Gist options
  • Select an option

  • Save bonkydog/4092320 to your computer and use it in GitHub Desktop.

Select an option

Save bonkydog/4092320 to your computer and use it in GitHub Desktop.
modernize ruby hash syntax
'{:type=>"Product", :client_id=>nil}'.gsub(/:(\w+)\s*=>\s*([^,)}]*)/, '\1: \2')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment