Error while coverting array to hash

In Ruby2.0.0,

I coded something as,

h = {a: 10, b: 20}
puts h.to_a.to_h

and I saw the error as,

undefined method `to_h’ for [[:a, 10], [:b, 20]]:Array (NoMethodError)

to_h is Ruby2.1