Don't use hash with indifferent access when converting hash
The HashWithIndifferentAccess will change all keys to strings when merged with another regular hash. This causes errors in cases where hashes are merged, for example in the action builder. Symbol/String type data is kept over the wire, so there is no need to make the mapped hash a HashWithIndifferentAccess.
This commit is contained in:
parent
73801703e7
commit
f1af42a7fc
@ -171,7 +171,7 @@ module VagrantPlugins
|
||||
|
||||
def converter(proto, mapper)
|
||||
begin
|
||||
h = Hash.new.tap do |result|
|
||||
Hash.new.tap do |result|
|
||||
proto.entries.each do |entry|
|
||||
# Convert our key and value to native types
|
||||
k = mapper.map(entry.key)
|
||||
@ -183,7 +183,6 @@ module VagrantPlugins
|
||||
result[k] = v
|
||||
end
|
||||
end
|
||||
Vagrant::Util::HashWithIndifferentAccess.new(h)
|
||||
rescue => err
|
||||
logger.error { "proto mapping to hash failed: #{err}" }
|
||||
raise
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user