Fix deprecated syntax for Ruby 1.9