[
{ year: 2000, a: 10},
{ year: 2001, a: 20}
]
[
{ year: 2000, b: 100},
{ year: 2001, b: 200}
]
[
{ year: 2000, c: 1000},
{ year: 2001, c: 2000}
]
[
{ year: 2000, a: 10, b: 100, c: 1000},
{ year: 2001, a: 20, b: 200, c: 2000}
]
a.map.with_index{|n, i| n.merge(b[i]).merge(c[i])}
(a + b + c).group_by{|n| n[:year]}.map{|i, n| n.reduce({}, :merge)}