title: Confused about "respond_to?" method
body: <p>Edit:  I'm using Ruby version 2.0.0</p>
  
  <p>I have the following code in a file example.rb</p>
  
  <pre><code>def say_hello
    puts 'hi'
  end
  
  puts respond_to?(:say_hello)
  say_hello
  </code></pre>
  
  <p>When running this code, the output is:</p>
  
  <pre><code>false
  hi
  </code></pre>
  
  <p>I'm confused why false is returned for "respond_to?" when I can use that method. </p>
  
  <p>The "respond_to?" method seems to work this way though:</p>
  
  <pre><code>class Person
    def say_bye
      puts 'bye'
    end
  end
  
  mike = Person.new
  puts mike.respond_to?(:say_bye)
  mike.say_bye
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>true
  bye
  </code></pre>
  
  <p>Does anyone have any insight as to why "respond_to?" returns false in the first case?</p>