summaryrefslogtreecommitdiff
path: root/lib/rubygems/gem_path_searcher.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-19 00:08:49 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-19 00:08:49 +0000
commite798ccbacf489a3af2201ae30058ff0ae7f79045 (patch)
tree4147a7834eb88323057fd2120a2ddc96c1eb32ab /lib/rubygems/gem_path_searcher.rb
parentd26fb035cae8d351dc238376722c980230dc5fbd (diff)
Import rubygems 1.5.0 (release candidate)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/gem_path_searcher.rb')
-rw-r--r--lib/rubygems/gem_path_searcher.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/rubygems/gem_path_searcher.rb b/lib/rubygems/gem_path_searcher.rb
index 6ee3c078d5..9dae006222 100644
--- a/lib/rubygems/gem_path_searcher.rb
+++ b/lib/rubygems/gem_path_searcher.rb
@@ -1,3 +1,9 @@
+######################################################################
+# This file is imported from the rubygems project.
+# DO NOT make modifications in this repo. They _will_ be reverted!
+# File a patch instead and assign it to Ryan Davis or Eric Hodel.
+######################################################################
+
##
# GemPathSearcher has the capability to find loadable files inside
# gems. It generates data up front to speed up searches later.
@@ -22,7 +28,7 @@ class Gem::GemPathSearcher
end
##
- # Look in all the installed gems until a matching _path_ is found.
+ # Look in all the installed gems until a matching +glob+ is found.
# Return the _gemspec_ of the gem where it was found. If no match
# is found, return nil.
#
@@ -41,16 +47,18 @@ class Gem::GemPathSearcher
# This method doesn't care about the full filename that matches;
# only that there is a match.
- def find(path)
- @gemspecs.find do |spec| matching_file? spec, path end
+ def find(glob)
+ @gemspecs.find do |spec|
+ matching_file? spec, glob
+ end
end
##
- # Works like #find, but finds all gemspecs matching +path+.
+ # Works like #find, but finds all gemspecs matching +glob+.
- def find_all(path)
+ def find_all(glob)
@gemspecs.select do |spec|
- matching_file? spec, path
+ matching_file? spec, glob
end
end