Created
January 26, 2018 01:11
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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