Summing data from two arrays, grouped and sorted by date
It looks as if you have chosen the wrong data structure. The multidimensional Array looks very much like a Hash. Even your code mentions the terms key (k) and value (v).

If you were to use a Hash, you could use Hash#merge:

one = Hash[[["23 Jan",3],["29 Jan",10],["19 Jan",23],["25 Jan",23]]]
two = Hash[[["31 Jan",7],["29 Jan",12],["01 Feb",4]]]

one.merge(two) { |_value, old, new| old + new }
# =&gt; {"23 Jan"=&gt;3, "29 Jan"=&gt;22, "19 Jan"=&gt;23, "25 Jan"=&gt;23, "31 Jan"=&gt;7, "01 Feb"=&gt;4}


Note: If you're using a recent version of Ruby, you can replace Hash::[] with Array#to_hash

If you really do need multidimensional Arrays, you could still use Hashes internally and convert to the required format (Hash#to_a) when needed.