Skip to content

Instantly share code, notes, and snippets.

@veganstraightedge
Created January 26, 2018 01:11
Show Gist options
  • Save veganstraightedge/4a9886db34a8654cf6f649481111af20 to your computer and use it in GitHub Desktop.
Save veganstraightedge/4a9886db34a8654cf6f649481111af20 to your computer and use it in GitHub Desktop.
Convert Ruby hashes from 1.8 style to 1.9+ style. From: http://effectif.com/ruby/update-your-project-for-ruby-19-hash-syntax
find . -name \*.rb -exec perl -p -i -e 's/([^:]):(\w+)\s*=>/\1\2:/g' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment