1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Easier preservation of activated specs

https://github.com/rubygems/rubygems/commit/54e923ffc2
This commit is contained in:
David Rodríguez 2021-11-17 17:47:25 +01:00 committed by git
parent fdd3eed037
commit 61f023f03b

View file

@ -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