diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-11-17 18:01:25 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-11-18 04:37:26 +0900 |
commit | f542ab2e6de7e41fbdd3a14b21ac21afa37cb73d (patch) | |
tree | b30fa714468e68ad2991818f2fe22a65c1439c0b /lib | |
parent | d8dde444e90274b6845ee7e817202880576bdd8e (diff) | |
download | ruby-f542ab2e6de7e41fbdd3a14b21ac21afa37cb73d.tar.gz |
[rubygems/rubygems] Make clearing loaded spec cache really private
https://github.com/rubygems/rubygems/commit/19f117652b
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/specification.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index f6c29b262b..304d9116fc 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -752,11 +752,12 @@ class Gem::Specification < Gem::BasicSpecification @@all ||= Gem.loaded_specs.values | stubs.map(&:to_spec) end - def self._clear_load_cache # :nodoc: + def self.clear_load_cache # :nodoc: LOAD_CACHE_MUTEX.synchronize do LOAD_CACHE.clear end end + private_class_method :clear_load_cache def self.each_gemspec(dirs) # :nodoc: dirs.each do |dir| @@ -1227,7 +1228,7 @@ class Gem::Specification < Gem::BasicSpecification @@stubs_by_name = {} @@spec_with_requirable_file = {} @@active_stub_with_requirable_file = {} - _clear_load_cache + clear_load_cache unresolved = unresolved_deps unless unresolved.empty? w = "W" + "ARN" |