Categories
English Uncategorized

Ruby 2.0.0 p195 PSA

In Ruby 2.0.0 patchlevel 195, you can no longer mix old- and new-style hash syntaxes in method arguments.

For example:

Wrong

method hello: 'there', :goodbye => 'goodnight'

Right

method { hello: 'there', :goodbye => 'goodnight' }

or

method :hello => 'there', :goodbye => 'goodnight'

Apparently this has been fixed in another patch to Ruby 2.0.0, but that doesn’t really matter, since p195 is out right now.

Source: https://gist.github.com/stephencelis/5595842