summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-03 15:15:32 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-03 15:15:32 -0800
commit329909e734051759c1f8377d1a13371e838159c5 (patch)
tree1b7b044059d041ddd0df314022f84dbdca6cb5b7 /lib
parent1f895b3cff6c985895eee2ed49d50cc73c1ac96b (diff)
downloadchef-tr.tar.gz
Use tr where we don't need gsub and a regextr
A regex isn't necessary to replace this string. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/run_lock.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/run_lock.rb b/lib/chef/run_lock.rb
index 416147a9e0..1f83b7ea5a 100644
--- a/lib/chef/run_lock.rb
+++ b/lib/chef/run_lock.rb
@@ -173,7 +173,7 @@ class Chef
# Mutex name is case-sensitive contrary to other things in
# windows. "\" is the only invalid character.
def acquire_win32_mutex
- @mutex = Chef::ReservedNames::Win32::Mutex.new("Global\\#{runlock_file.gsub(/\\/, "/").downcase}")
+ @mutex = Chef::ReservedNames::Win32::Mutex.new("Global\\#{runlock_file.tr('\\', "/").downcase}")
mutex.test
end