title: ruby syntax error, unexpected $end, expecting keyword_end
body: <p>The following code is showing me the error as follows:</p>
  
  <pre><code>"ruby -KU -- 'C:\Users\Ishmael\My Documents\Aptana Studio 3 Workspace\Simple\FirstFile'
  C:/Users/Ishmael/My Documents/Aptana Studio 3 Workspace/Simple/FirstFile:55: syntax error, unexpected $end, expecting keyword_end"
  </code></pre>
  
  <p>I searched for the extra end(s) and the trailing '.'s but in vain and I still can't figure out why it's not working!</p>
  
  <pre><code>class Greeter
    attr_accessor :name
  
    def initialize(name="dudes")
      @name=name
    end
  
    def say_hi
  
      if @name.nil?
        puts "..."
      else if @name.respond_to?("each")
  
        @name.each do |name|
          puts "Hello #{name.capitalize}!"
        end
  
      else
        puts "Hi #{@name.capitalize}!"
      end
  
    end 
  
    def say_bye
  
      if @name.nil?
        puts "..."
      else if @name.respond_to?("join")
        puts 'Goodbye #{@name.join(", ").capitalize}! Come back soon!'
      else
        puts "Bye #{@name.capitalize}!"
      end
  
    end
  
  end
  
  if __FILE__ == $0
  
    greeter = Greeter.new
    greeter.say_hi
    greeter.say_bye
  
    greeter.name = "Ishmael"
    greeter.say_hi
    greeter.say_bye
  
    greeter.name = ["Albert", "Brenda", "Charles", "Dave", "Englebert"]
    greeter.say_hi
    greeter.say_bye
  
    greeter.name = nil
    greeter.say_hi
    greeter.say_bye
  end
  </code></pre>