title: Why can't singleton methods be defined on Symbols or Fixnums?
body: <p>There are a some Ruby classes that don't allow singleton methods to be defined on their instances. For example, <code>Symbol</code>:</p>
  
  <pre><code>var = :asymbol
  
  def var.hello
    "hello"
  end
  
  # TypeError: can't define singleton method "hello" for Symbol
  </code></pre>
  
  <p><em>I thought this might be a restriction on all immediate values, but it seems to work for <code>nil</code>, <code>true</code>, and <code>false</code></em> (but not instances of <code>Fixnum</code> or <code>Bignum</code>):</p>
  
  <pre><code>var = true
  
  def var.hello
    "hello"
  end
  
  var.hello #=&gt; "hello"
  </code></pre>
  
  <p>I don't understand why why Ruby allows singleton methods to be defined on certain classes of objects but not others.</p>