Update generator.rb

Removing warning for Ruby 1.9