ruby-changes:57929
From: bronzdoc <ko1@a...>
Date: Thu, 26 Sep 2019 20:37:56 +0900 (JST)
Subject: [ruby-changes:57929] 5c872b297c (master): [rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instances
https://git.ruby-lang.org/ruby.git/commit/?id=5c872b297c From 5c872b297c11394cc436885400c295f7dccff039 Mon Sep 17 00:00:00 2001 From: bronzdoc <lsagastume1990@g...> Date: Fri, 21 Jun 2019 19:37:09 -0600 Subject: [rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instances https://github.com/rubygems/rubygems/commit/ba021fb4be diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index a41cbde..d4290d9 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -2303,7 +2303,6 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L2303 when Time then obj.strftime('%Y-%m-%d').dump when Numeric then obj.inspect when true, false, nil then obj.inspect - when OpenSSL::PKey::RSA then obj.class when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})" when Gem::Requirement then list = obj.as_list @@ -2462,9 +2461,8 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L2461 @@attributes.each do |attr_name| next if handled.include? attr_name current_value = self.send(attr_name) - if current_value != default_value(attr_name) or - self.class.required_attribute? attr_name - result << " s.#{attr_name} = #{ruby_code current_value}" + if current_value != default_value(attr_name) || self.class.required_attribute?(attr_name) + result << " s.#{attr_name} = #{ruby_code current_value}" unless current_value.is_a?(OpenSSL::PKey::RSA) end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/