mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix defined? expressions
* lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
23529f5d03
commit
192b63fd3e
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Sun Jan 3 23:55:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM):
|
||||||
|
should check same name as the used constants.
|
||||||
|
[ruby-core:72674] [Bug #11940]
|
||||||
|
|
||||||
Sun Jan 3 19:22:01 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Jan 3 19:22:01 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* aclocal.m4: add fallback file for non-aclocal environments.
|
* aclocal.m4: add fallback file for non-aclocal environments.
|
||||||
|
|
|
@ -340,7 +340,7 @@ module Gem::Security
|
||||||
# Digest algorithm used to sign gems
|
# Digest algorithm used to sign gems
|
||||||
|
|
||||||
DIGEST_ALGORITHM =
|
DIGEST_ALGORITHM =
|
||||||
if defined?(OpenSSL::Digest) then
|
if defined?(OpenSSL::Digest::SHA1) then
|
||||||
OpenSSL::Digest::SHA1
|
OpenSSL::Digest::SHA1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ module Gem::Security
|
||||||
# Algorithm for creating the key pair used to sign gems
|
# Algorithm for creating the key pair used to sign gems
|
||||||
|
|
||||||
KEY_ALGORITHM =
|
KEY_ALGORITHM =
|
||||||
if defined?(OpenSSL::PKey) then
|
if defined?(OpenSSL::PKey::RSA) then
|
||||||
OpenSSL::PKey::RSA
|
OpenSSL::PKey::RSA
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue