title: Empty arrays returned in Ruby recursion
body: <p>I am trying to solve a recursion problem.</p>
  
  <p>Code:</p>
  
  <pre><code>def divide(array)
    half = array.length/2
    return array if array.length == 1
    print ary1 = divide(array[0..half - 1])
    print ary2 = divide(array[half..-1])
    merge(ary1, ary2)
  end
  def merge(ary1, ary2)
    sorted = []
  end
  
  divide([10,9,8,-300,250,1,7,6,5,4,3,2])
  </code></pre>
  
  <p>If I don't comment out the <code>sorted</code> variable, it returns a few blank arrays mixed with numbers:</p>
  
  <pre><code>[10][9][8][][][-300][250][1][][][][7][6][5][][][4][3][2][][][]
  </code></pre>
  
  <p>I have no idea why naming a variable (but not calling it) would result in a different output than otherwise. Any insight into this would be appreciated.</p>