title: Why in Ruby do uninitialized instance variables return nil, but uninitialized class variables raise an error?
body: <p>In Ruby, why does an uninitialized instance variable return <code>nil</code> while an uninitialized class variable raises a <code>NameError</code>?</p>
  
  <p>Compare:</p>
  
  <pre><code>@some_uninitialized_variable # =&gt; nil
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>@@some_uninitialized_class_variable # =&gt; NameError
  </code></pre>