title: NameError in Ruby
body: <p>For this piece of code:</p>
  
  <pre><code>class myBaseClass
    def funcTest()
      puts "baseClass"
    end
  end
  myBaseClass.new.funcTest
  </code></pre>
  
  <p>I am getting an error:</p>
  
  <pre><code>NameError: undefined local variable or method `myBaseClass' for main:Object
  from c:/Users/Yurt/Documents/ruby/polymorphismTest.rb:9
  from (irb):145:in `eval'
  from (irb):145
  from c:/Ruby192/bin/irb:12:in `&lt;main&gt;'
  irb(main):152:0&gt; x=myBaseClass.new
  </code></pre>
  
  <p>When I try<code>x=myBaseClass.new</code>, I get:</p>
  
  <pre><code>NameError: undefined local variable or method `myBaseClass' for main:Object from (irb):152
  </code></pre>
  
  <p>Has someone already encountered this problem? I don't think my code can be wrong.</p>