title: Ruby accessing constants from inner-class
body: <p>I have a nested class like so:</p>
  
  <pre><code>class Mammal
      H = "Mammal"
  
      class Human
          H = "Human"
      end
  
  end
  </code></pre>
  
  <p>And I want to make an Human object and after access the Human's constant, like so:</p>
  
  <pre><code>human = Mammal::Human.new # makes an object successfully
  
  puts human::H             # does not work **
  puts Mammal::Human::H     # works ["Human"]
  puts Mammal::H            # works ["Mammal"]
  </code></pre>
  
  <p>**.. but it won't work ("..is not a class/module [TypeError]"). What am i doing wrong?</p>