summaryrefslogtreecommitdiff
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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/gem_path_searcher.rb b/lib/rubygems/gem_path_searcher.rb
index 6ee3c078d5..a745b0291c 100644
--- a/lib/rubygems/gem_path_searcher.rb
+++ b/lib/rubygems/gem_path_searcher.rb
@@ -69,8 +69,8 @@ class Gem::GemPathSearcher
def matching_files(spec, path)
return [] unless @lib_dirs[spec.object_id] # case no paths
- glob = File.join @lib_dirs[spec.object_id], "#{path}#{Gem.suffix_pattern}"
- Dir[glob].select { |f| File.file? f.untaint }
+ load_path = File.join(@lib_dirs[spec.object_id], path)
+ Gem.suffixes.map {|sfx| load_path + sfx}.select {|f| File.file?(f.untaint)}
end
##