From c97af3f7db45c322e0f3bcb426ef32f515630fd8 Mon Sep 17 00:00:00 2001 From: Tim Sharpe Date: Sun, 3 Feb 2019 13:15:53 +1100 Subject: [PATCH] (rubocop) Fix Performance/RegexpMatch --- lib/vmfloaty/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmfloaty/ssh.rb b/lib/vmfloaty/ssh.rb index 5de4313..9adee9c 100644 --- a/lib/vmfloaty/ssh.rb +++ b/lib/vmfloaty/ssh.rb @@ -24,7 +24,7 @@ class Ssh response = Pooler.retrieve(verbose, os_types, token, url) raise "Could not get vm from vmpooler:\n #{response}" unless response['ok'] - user = host_os =~ /win/ ? 'Administrator' : 'root' + user = /win/.match?(host_os) ? 'Administrator' : 'root' hostname = "#{response[host_os]['hostname']}.#{response['domain']}" cmd = "#{ssh_path} #{user}@#{hostname}"