diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-10-26 11:51:28 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-26 11:51:28 -0700 |
commit | 8837ebfda2a4292976d44ec564f349f357349fc1 (patch) | |
tree | 765d2e98a4c0bead2030f411f07613207e5070b5 /lib/chef/run_lock.rb | |
parent | 4d13c5acaa8596eab50b7d62252a6d94ab290d61 (diff) | |
download | chef-simplify_regex.tar.gz |
Simplify some regexes by removing redundant character classessimplify_regex
New RuboCop here. There's no need for character classes when all we have is a single character.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/run_lock.rb')
-rw-r--r-- | lib/chef/run_lock.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/run_lock.rb b/lib/chef/run_lock.rb index 75d1432773..416147a9e0 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.gsub(/\\/, "/").downcase}") mutex.test end |