Fix forward_ports with ruby 3.0 (#1242)

Fedora 24 has moved to ruby 3.0, which triggers an exception in 
vagrant-libvirt when installing it with vagrant provided by the distro.

This is caused by a chance in ruby 3.0 that can be applied to earlier
versions without any down sides:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
This commit is contained in:
Emilio Cobos Álvarez 2021-04-06 16:20:04 +02:00 committed by GitHub
parent 1c82be1357
commit 28d475ca29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ jobs:
- ruby: 2.6.6
vagrant: v2.2.14
allow_fail: false
# TODO: We should add ruby 3.0, once vagrant can be tested with it.
steps:
- uses: actions/checkout@v2

View File

@ -44,7 +44,7 @@ module VagrantPlugins
@env[:ui].info(I18n.t(
'vagrant.actions.vm.forward_ports.forwarding_entry',
message_attributes
**message_attributes
))
if fp[:protocol] == 'udp'