title: Accessor method is defined but does not work
body: <p>I have this code:</p>
  
  <pre><code>class A
    attr_accessor :count
  
    def initialize
      @count = 0
    end
  
    def increase_count
      count += 1
    end
  end
  
  A.new.increase_count
  </code></pre>
  
  <p>It complains:</p>
  
  <pre><code>in `increase_count': undefined method `+' for nil:NilClass (NoMethodError)
  </code></pre>
  
  <p>If I change the <code>increase_count</code> definition to:</p>
  
  <pre><code>class A
    def increase_count
      @count += 1
    end
  end
  </code></pre>
  
  <p>then it does not complain. May be I am missing something, or it is just a weird behaviour of Ruby.</p>