Skip to content

Instantly share code, notes, and snippets.

@madlep
Created February 24, 2014 03:26
Show Gist options
  • Save madlep/9181482 to your computer and use it in GitHub Desktop.
Save madlep/9181482 to your computer and use it in GitHub Desktop.
recursively update all files in a directory to ruby 1.9 hash syntax
# stolen 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