diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-08 07:22:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-08 07:22:07 +0000 |
commit | e45d17b9d24d3d70eb974f52a6e981b212f47f6c (patch) | |
tree | b186891170d3bb1b51bad59c408db7ba5b0bda14 /lib/rubygems | |
parent | efbad5fa481a6e34f4d8b9f9355df2a6d7602a95 (diff) | |
download | ruby-e45d17b9d24d3d70eb974f52a6e981b212f47f6c.tar.gz |
* lib/rubygems.rb (Gem.find_files): fixed search order same as
default behavior.
* lib/rubygems/gem_path_searcher.rb (matching_files): check if
exist, not globbing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/gem_path_searcher.rb | 4 |
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 ## |