diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-12-26 20:32:49 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-12-26 20:32:49 -0800 |
commit | 0cefcaa319b0d2f07241b78bf7d6f06de03d07ef (patch) | |
tree | 5c1061b328d1769e8ad1c995db78a5521736c33e /lib/chef/run_lock.rb | |
parent | 50a0001bae754c66feb69c84b64cb305a03a34d2 (diff) | |
download | chef-Performance_StringIdentifierArgument.tar.gz |
Resolve Performance/StringIdentifierArgument warningsPerformance_StringIdentifierArgument
Inernally it's all a symbol so skip the conversion
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 8382983ca0..b70a936aab 100644 --- a/lib/chef/run_lock.rb +++ b/lib/chef/run_lock.rb @@ -144,7 +144,7 @@ class Chef # If we support FD_CLOEXEC, then use it. # NB: ruby-2.0.0-p195 sets FD_CLOEXEC by default, but not # ruby-1.8.7/1.9.3 - if Fcntl.const_defined?("F_SETFD") && Fcntl.const_defined?("FD_CLOEXEC") + if Fcntl.const_defined?(:F_SETFD) && Fcntl.const_defined?(:FD_CLOEXEC) runlock.fcntl(Fcntl::F_SETFD, runlock.fcntl(Fcntl::F_GETFD, 0) | Fcntl::FD_CLOEXEC) end # Flock will return 0 if it can acquire the lock otherwise it |