summaryrefslogtreecommitdiff
path: root/lib/chef/provider/mount/windows.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/mount/windows.rb')
-rw-r--r--lib/chef/provider/mount/windows.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/mount/windows.rb b/lib/chef/provider/mount/windows.rb
index 0fb5aa7645..a7bb23d224 100644
--- a/lib/chef/provider/mount/windows.rb
+++ b/lib/chef/provider/mount/windows.rb
@@ -17,7 +17,7 @@
#
require "chef/provider/mount"
-if RUBY_PLATFORM =~ /mswin|mingw32|windows/
+if RUBY_PLATFORM.match?(/mswin|mingw32|windows/)
require "chef/util/windows/net_use"
require "chef/util/windows/volume"
end
@@ -30,7 +30,7 @@ class Chef
provides :mount, os: "windows"
def is_volume(name)
- name =~ /^\\\\\?\\Volume\{[\w-]+\}\\$/ ? true : false
+ name.match?(/^\\\\\?\\Volume\{[\w-]+\}\\$/) ? true : false
end
def initialize(new_resource, run_context)