[前][次][番号順一覧][スレッド一覧]

ruby-changes:69794

From: David <ko1@a...>
Date: Thu, 18 Nov 2021 04:37:47 +0900 (JST)
Subject: [ruby-changes:69794] f542ab2e6d (master): [rubygems/rubygems] Make clearing loaded spec cache really private

https://git.ruby-lang.org/ruby.git/commit/?id=f542ab2e6d

From f542ab2e6de7e41fbdd3a14b21ac21afa37cb73d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 17 Nov 2021 18:01:25 +0100
Subject: [rubygems/rubygems] Make clearing loaded spec cache really private

https://github.com/rubygems/rubygems/commit/19f117652b
---
 lib/rubygems/specification.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index f6c29b262b5..304d9116fcf 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -752,11 +752,12 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L752
     @@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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1228
     @@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"
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]