title: How can I reverse ruby's include function
body: <p>I'll explain what i'm looking for in code as thats probably the most succinct: </p>
  
  <pre><code>module Mixin
    def method
      puts "Foo"
    end
  end
  
  class Whatever
    include Mixin
  end
  
  w = Whatever.new
  w.method
  =&gt; "Foo"
  
  # some magic here
  w2 = Whatever.new
  w.method
  =&gt; NoMethodError
  </code></pre>
  
  <p>I had tried just undefining the Mixin module using remove_const, but this doesn't seem to make any difference to Whatever. I had assumed that #include just added a reference to the module into the class's method resolution chain - but this behaviour doesn't agree with that.</p>
  
  <p>Can anyone tell me what include actually does behind the scenes, and how to reverse this?</p>