aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/gem_path_searcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/gem_path_searcher.rb')
-rw-r--r--lib/rubygems/gem_path_searcher.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rubygems/gem_path_searcher.rb b/lib/rubygems/gem_path_searcher.rb
index 5b85cbc9fb..79c3b0f6c9 100644
--- a/lib/rubygems/gem_path_searcher.rb
+++ b/lib/rubygems/gem_path_searcher.rb
@@ -56,6 +56,14 @@ class Gem::GemPathSearcher
end
end
+ def find_active(glob)
+ # HACK violation of encapsulation
+ @gemspecs.find do |spec|
+ # TODO: inverted responsibility
+ spec.loaded? and matching_file? spec, glob
+ end
+ end
+
##
# Works like #find, but finds all gemspecs matching +glob+.