Issue 1227 - Conflicts Solved

Updated  @xiangyu89's PR to allow for a painless merge with the master branch.
Indent `when` as deep as `case`.<br>Use the new Ruby 1.9 hash syntax.<br>Line is too long. [81/80]<br>Space inside { missing.<br>Space inside } missing.