Fix a few deprecation warnings for ruby 2.7

This commit is contained in:
sophia 2020-08-10 16:32:54 -05:00
parent 203ebf59ad
commit e7e956ca12
5 changed files with 6 additions and 6 deletions

View File

@ -29,7 +29,7 @@ module VagrantPlugins
# @return [Pathname] ISO location
# @note If file_destination exists, source_directory will be checked
# for recent modifications and a new ISO will be generated if requried.
def self.create_iso(env, source_directory, **extra_opts)
def self.create_iso(env, source_directory, extra_opts={})
source_directory = Pathname.new(source_directory)
file_destination = self.ensure_output_iso(extra_opts[:file_destination])

View File

@ -29,7 +29,7 @@ module VagrantPlugins
# @return [Pathname] ISO location
# @note If file_destination exists, source_directory will be checked
# for recent modifications and a new ISO will be generated if requried.
def self.create_iso(env, source_directory, **extra_opts)
def self.create_iso(env, source_directory, extra_opts={})
source_directory = Pathname.new(source_directory)
file_destination = self.ensure_output_iso(extra_opts[:file_destination])

View File

@ -29,7 +29,7 @@ module VagrantPlugins
# @return [Pathname] ISO location
# @note If file_destination exists, source_directory will be checked
# for recent modifications and a new ISO will be generated if requried.
def self.create_iso(env, source_directory, **extra_opts)
def self.create_iso(env, source_directory, extra_opts={})
source_directory = Pathname.new(source_directory)
file_destination = self.ensure_output_iso(extra_opts[:file_destination])

View File

@ -400,7 +400,7 @@ module VagrantPlugins
if Vagrant::Util::Experimental.feature_enabled?("dependency_provisioners")
opts = {before: before, after: after}
prov = VagrantConfigProvisioner.new(name, type.to_sym, opts)
prov = VagrantConfigProvisioner.new(name, type.to_sym, **opts)
else
prov = VagrantConfigProvisioner.new(name, type.to_sym)
end

View File

@ -48,7 +48,7 @@ module VagrantPlugins
# bridged networking don't require port-forwarding and establishing
# forwarded ports on these attachment types has uncertain behaviour.
@env[:ui].detail(I18n.t("vagrant.actions.vm.forward_ports.forwarding_entry",
message_attributes))
**message_attributes))
# Verify we have the network interface to attach to
if !interfaces[fp.adapter]
@ -62,7 +62,7 @@ module VagrantPlugins
# so verify that that is the case.
if interfaces[fp.adapter][:type] != :nat
@env[:ui].detail(I18n.t("vagrant.actions.vm.forward_ports.non_nat",
message_attributes))
**message_attributes))
next
end