Basic for loop summation in ruby : I'm new to ruby.  What's wrong with this thought process when trying to sum the array values?  I know there are other ways to do this like using reduce or even sum but am I not just adding the next value to 'sum' every iteration?

    def addArray(array)
      for i in array do
        sum += i
      end
    end

    addArray([1,3,6,8,7,10]); 