Skip to content

Instantly share code, notes, and snippets.

@AlexanderEkdahl
Last active December 27, 2015 00:49
Show Gist options
  • Save AlexanderEkdahl/7240643 to your computer and use it in GitHub Desktop.
Save AlexanderEkdahl/7240643 to your computer and use it in GitHub Desktop.
Converts all code from Ruby 1.8 hash style to 1.9 style. Copied from http://effectif.com/ruby/update-your-project-for-ruby-19-hash-syntax for safekeeping. Original author [@GrahamAshton](https://twitter.com/grahamashton)
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