title: What does 'Monkey Patching' exactly Mean in Ruby?
body: <p>According to Wikipedia, a <a href="http://en.wikipedia.org/wiki/Monkey_patch" rel="noreferrer">monkey patch</a> is:</p>
  
  <blockquote>
    <p>a way to extend or modify the runtime
    code of dynamic languages [...]
    without altering the original source
    code.</p>
  </blockquote>
  
  <p>The following statement from the same entry confused me:</p>
  
  <blockquote>
    <p>In Ruby, the term monkey patch was
    misunderstood to mean any dynamic
    modification to a class and is often
    used as a synonym for dynamically
    modifying any class at runtime.</p>
  </blockquote>
  
  <p>I would like to know <strong>the exact meaning of monkey patching in Ruby.</strong> Is it doing something like the following, or is it something else?</p>
  
  <pre><code>class String
    def foo
      "foo"
    end
  end
  </code></pre>