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)
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs