From 61f023f03b7571c0190f62a6bf811a64f61b118e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 17 Nov 2021 17:47:25 +0100 Subject: [PATCH] [rubygems/rubygems] Easier preservation of activated specs https://github.com/rubygems/rubygems/commit/54e923ffc2 --- lib/rubygems/specification.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 1c7632fd37..a4dba9699e 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -750,13 +750,7 @@ class Gem::Specification < Gem::BasicSpecification def self._all # :nodoc: unless @@all - @@all = stubs.map(&:to_spec) - - # After a reset, make sure already loaded specs - # are still marked as activated. - specs = {} - Gem.loaded_specs.each_value{|s| specs[s] = true } - @@all.each{|s| s.activated = true if specs[s] } + @@all = Gem.loaded_specs.values | stubs.map(&:to_spec) end @@all end