Error in Ruby 1.8.7

Line 21 is not compatible to Ruby 1.8.7.