1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems.rb (Gem.find_files): reverted to use globbing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-08-08 07:42:51 +00:00
parent b26000068e
commit 1c8c901e3c
3 changed files with 8 additions and 9 deletions

View file

@ -69,8 +69,8 @@ class Gem::GemPathSearcher
def matching_files(spec, path)
return [] unless @lib_dirs[spec.object_id] # case no paths
load_path = File.join(@lib_dirs[spec.object_id], path)
Gem.suffixes.map {|sfx| load_path + sfx}.select {|f| File.file?(f.untaint)}
glob = File.join @lib_dirs[spec.object_id], "#{path}#{Gem.suffix_pattern}"
Dir[glob].select { |f| File.file? f.untaint }
end
##