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 /chef-config | |
| 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 'chef-config')
| -rw-r--r-- | chef-config/lib/chef-config/config.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 3eb8c8475c..9b5f5a849a 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -1287,10 +1287,10 @@ module ChefConfig require "digest/md5" unless defined?(Digest::MD5) # Remove pre-existing constants if they do exist to reduce the # amount of log spam and warnings. - Digest.send(:remove_const, "SHA1") if Digest.const_defined?("SHA1") - Digest.const_set("SHA1", OpenSSL::Digest::SHA1) - OpenSSL::Digest.send(:remove_const, "MD5") if OpenSSL::Digest.const_defined?("MD5") - OpenSSL::Digest.const_set("MD5", Digest::MD5) + Digest.send(:remove_const, "SHA1") if Digest.const_defined?(:SHA1) + Digest.const_set(:SHA1, OpenSSL::Digest::SHA1) + OpenSSL::Digest.send(:remove_const, "MD5") if OpenSSL::Digest.const_defined?(:MD5) + OpenSSL::Digest.const_set(:MD5, Digest::MD5) ChefConfig.logger.debug "FIPS mode is enabled." end end |
