Replace Ruby 1.8 syntax with the modern one