aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-03 14:55:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-03 14:55:25 +0000
commit12bfff40792be186a45a56fe50a22f95799e424f (patch)
tree657a532412595b846d3172f055c10cb4216c5a1e
parent97667cdd49977c30ec8617c6e368ea4f76b883ba (diff)
downloadruby-12bfff40792be186a45a56fe50a22f95799e424f.tar.gz
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
-rw-r--r--ChangeLog6
-rw-r--r--lib/rubygems/security.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 490768ecaa..3d663b05ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* aclocal.m4: add fallback file for non-aclocal environments.
diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb
index d44ebec9f5..941462d7bd 100644
--- a/lib/rubygems/security.rb
+++ b/lib/rubygems/security.rb
@@ -340,7 +340,7 @@ module Gem::Security
# Digest algorithm used to sign gems
DIGEST_ALGORITHM =
- if defined?(OpenSSL::Digest) then
+ if defined?(OpenSSL::Digest::SHA1) then
OpenSSL::Digest::SHA1
end
@@ -356,7 +356,7 @@ module Gem::Security
# Algorithm for creating the key pair used to sign gems
KEY_ALGORITHM =
- if defined?(OpenSSL::PKey) then
+ if defined?(OpenSSL::PKey::RSA) then
OpenSSL::PKey::RSA
end