[前][次][番号順一覧][スレッド一覧]

ruby-changes:41347

From: nobu <ko1@a...>
Date: Sun, 3 Jan 2016 23:55:18 +0900 (JST)
Subject: [ruby-changes:41347] nobu:r53419 (trunk): Fix defined? expressions

nobu	2016-01-03 23:55:25 +0900 (Sun, 03 Jan 2016)

  New Revision: 53419

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53419

  Log:
    Fix defined? expressions
    
    * lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM):
      should check same name as the used constants.
      [ruby-core:72674] [Bug #11940]

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/security.rb
Index: lib/rubygems/security.rb
===================================================================
--- lib/rubygems/security.rb	(revision 53418)
+++ lib/rubygems/security.rb	(revision 53419)
@@ -340,7 +340,7 @@ module Gem::Security https://github.com/ruby/ruby/blob/trunk/lib/rubygems/security.rb#L340
   # 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/security.rb#L356
   # 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
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53418)
+++ ChangeLog	(revision 53419)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jan  3 23:55:13 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* aclocal.m4: add fallback file for non-aclocal environments.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]