title: Why do class objects have access to instance modules in Kernel module?
body: <p>I'm learning Ruby and recently discovered something I didn't quite understand. When mixing in modules into Classes, a class Object can not access the modules instance methods. </p>
  
  <pre><code>module Swimmable
    def swim
      puts 'can swim'
    end
  end
  
  class Fish
    include Swimmable
  end
  
  Fish.swim
  </code></pre>
  
  <p>Result is <code>undefined method 'swim' for Fish:Class (NoMethodError)</code> which is expected</p>
  
  <p>However if the instance method is defined in the Kernel module, I can access it using a class object and an instance object.</p>
  
  <pre><code>module Kernel
    def swim
      puts 'can swim'
    end
  end
  
  class Fish; end
  
  Fish.swim # =&gt; can swim
  Fish.new.swim # =&gt; can swim
  </code></pre>
  
  <p>What makes the class object <code>Fish</code> able to access instance methods in the Kernel module?</p>