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:
parent
fdd3eed037
commit
61f023f03b
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue