Skip to content

Instantly share code, notes, and snippets.

@toadkicker
Created July 18, 2013 17:14
Show Gist options
  • Save toadkicker/6031104 to your computer and use it in GitHub Desktop.
Save toadkicker/6031104 to your computer and use it in GitHub Desktop.
Convert old ruby hash syntax to new
find . -type f -iname '*.rb' | xargs ruby -i -pe 'gsub(/(?<!:):(\w+)\s*=>\s*/, "\\1: ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment