summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-17 17:47:25 +0100
committergit <svn-admin@ruby-lang.org>2021-11-18 04:37:25 +0900
commit61f023f03b7571c0190f62a6bf811a64f61b118e (patch)
tree32104af63ee037b2ddfdd6b31b1afc04b982e7ca /lib/rubygems
parentfdd3eed037feabaf2daaa9e1ccec22ad751c5b03 (diff)
[rubygems/rubygems] Easier preservation of activated specs
https://github.com/rubygems/rubygems/commit/54e923ffc2
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/specification.rb8
1 files changed, 1 insertions, 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