Migrating a project to Ruby 1.9 hash syntax
I’ve just had to update all the hashes in a project to use Ruby 1.9’s new syntax for hashes whose keys are symbols (from :key => 'value'
to key: 'value'
).
There’s no need to make the changes by hand - I wrote a one-liner to do it for me.
You’ll find it here: http://effectif.com/ruby/update-your-project-for-ruby-19-hash-syntax
Post a comment