fog / fog-xenserver

Module for the 'fog' gem to support XENSERVER
MIT License
16 stars 22 forks source link

avoid monkey patching Hash #70

Closed onyxblade closed 6 years ago

onyxblade commented 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.

It's better to change it into data.replace(data.map{|k, v| [k.to_sym, v]}.to_h).