Closed onyxblade closed 6 years ago
https://github.com/fog/fog-xenserver/blob/323f72b10ae6592c1ef49b3133818658db2b93b9/lib/fog/utilities.rb#L1-L8
This file adds symbolize_keys! for Hash and here is the only call https://github.com/fog/fog-xenserver/blob/45c5b5be75c4ad95db294dabe78d53b7cde623f7/lib/fog/parsers/xen_server/base.rb#L17.
symbolize_keys!
Hash
It's better to change it into data.replace(data.map{|k, v| [k.to_sym, v]}.to_h).
data.replace(data.map{|k, v| [k.to_sym, v]}.to_h)
https://github.com/fog/fog-xenserver/blob/323f72b10ae6592c1ef49b3133818658db2b93b9/lib/fog/utilities.rb#L1-L8
This file adds
symbolize_keys!
forHash
and here is the only call https://github.com/fog/fog-xenserver/blob/45c5b5be75c4ad95db294dabe78d53b7cde623f7/lib/fog/parsers/xen_server/base.rb#L17.It's better to change it into
data.replace(data.map{|k, v| [k.to_sym, v]}.to_h)
.