summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-05-06 15:34:23 +0200
committergit <svn-admin@ruby-lang.org>2024-05-14 16:08:02 +0000
commit5628cc1229ea1f53788a263cc0a6ae8df1ad428f (patch)
tree247b4f3f496aad678137b0d60b0f966697cfddb5
parent91e387197010586b0fc815f2a83c77832a0f0aa3 (diff)
[rubygems/rubygems] Add missing docs
Other analog methods are documented, so document this one too. https://github.com/rubygems/rubygems/commit/76da34d44d
-rw-r--r--lib/rubygems/specification.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index ca418cd394..e369516bdd 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1044,6 +1044,10 @@ class Gem::Specification < Gem::BasicSpecification
stub&.to_spec
end
+ ##
+ # Return the best specification that contains the file matching +path+, among
+ # those already activated.
+
def self.find_active_stub_by_path(path)
stub = @@active_stub_with_requirable_file[path] ||= stubs.find do |s|
s.activated? && s.contains_requirable_file?(path)