Fix "Object#timeout is deprecated" ruby 2.3 warning

This commit is contained in:
penz 2016-04-27 10:58:31 -03:00
parent 7e8dcb241b
commit 32b9e675c0

View File

@ -77,7 +77,7 @@ module VagrantPlugins
# Check if we can open a connection to the host
def ping(host, timeout = 3)
timeout(timeout) do
::Timeout.timeout(timeout) do
s = TCPSocket.new(host, 'echo')
s.close
end