core: public_send vs send when merging configs
This fixes the problem when config keys collide with Kernel/Object methods (private). An example is `exec` which is used in vagrant-exec plugin. Compare: > old.send :exec ArgumentError: wrong number of arguments (0 for 1+) > old.public_send :exec => #<Vagrant::Config::V2::DummyConfig:0x007fe212cc05c8>
This commit is contained in:
parent
ca428388d8
commit
34ec385c81
|
@ -55,10 +55,10 @@ module Vagrant
|
|||
# merge every key. This avoids issues with the same reference
|
||||
# being part of the config.
|
||||
old_state["config_map"].each do |k, _|
|
||||
old.send(k)
|
||||
old.public_send(k)
|
||||
end
|
||||
new_state["config_map"].each do |k, _|
|
||||
new.send(k)
|
||||
new.public_send(k)
|
||||
end
|
||||
|
||||
# The config map for the new object is the old one merged with the
|
||||
|
|
Loading…
Reference in New Issue