Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #8035. This PR fixes the following false positive for `Lint/DeprecatedOpenSSLConstant` when using double quoted string argument. ```console % cat example.rb OpenSSL::Cipher::AES256.new('cbc') OpenSSL::Cipher::AES256.new("cbc") % bundle exec rubocop --only Lint/DeprecatedOpenSSLConstant -a (snip) Offenses: example.rb:1:1: W: [Corrected] Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Cipher.new('AES-256-cbc') instead of OpenSSL::Cipher::AES256.new('cbc'). OpenSSL::Cipher::AES256.new('cbc') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ example.rb:2:1: W: [Corrected] Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Cipher.new('AES-256-"cbc"') instead of OpenSSL::Cipher::AES256.new("cbc"). OpenSSL::Cipher::AES256.new("cbc") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % cat example.rb OpenSSL::Cipher.new('AES-256-cbc') OpenSSL::Cipher.new('AES-256-"cbc"') ``` #8035 has another different false positive, which resolves as another PR.
- Loading branch information