title: Ruby attr_accessor wrapper returning nil.
body: <p>I have a simple class and am transposing a two dimensional array like so: </p>
  
  <pre><code>class Group
    attr_accessor :group_array
    def initialize
      @group_array = []
    end
  
    ...
  
    def shuffle_groups!
      new_groups = group_array.transpose
      group_array = new_groups
    end
  
  end
  </code></pre>
  
  <p>However, when I try to set the new group array in one line like so:</p>
  
  <pre><code>def shuffle_groups!
      group_array = group_array.transpose
  end
  </code></pre>
  
  <p>I get: </p>
  
  <pre><code>undefined method `transpose' for nil:NilClass
  </code></pre>
  
  <p>Why does this not work? </p>