diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
commit | 372dcece3f69989d133f720468f1e24aa1133cda (patch) | |
tree | c173ca48a23ce18afa44feb15bf68d2dd14ac619 /lib/rubygems/source_info_cache.rb | |
parent | d0e5a34ac7c34e70c145024a0fed8f6042814f29 (diff) |
Update to RubyGems 1.3.7.pre.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/source_info_cache.rb')
-rw-r--r-- | lib/rubygems/source_info_cache.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rubygems/source_info_cache.rb b/lib/rubygems/source_info_cache.rb index 4289cdb52a..36615d82a1 100644 --- a/lib/rubygems/source_info_cache.rb +++ b/lib/rubygems/source_info_cache.rb @@ -285,17 +285,19 @@ class Gem::SourceInfoCache cache_data.map do |source_uri, sic_entry| next unless Gem.sources.include? source_uri # TODO - Remove this gunk after 2008/11 - unless pattern.kind_of?(Gem::Dependency) - pattern = Gem::Dependency.new(pattern, Gem::Requirement.default) + unless pattern.kind_of? Gem::Dependency then + pattern = Gem::Dependency.new pattern, Gem::Requirement.default end sic_entry.source_index.search pattern, platform_only end.flatten.compact end + ## # Searches all source indexes for +pattern+. If +only_platform+ is true, # only gems matching Gem.platforms will be selected. Returns an Array of # pairs containing the Gem::Specification found and the source_uri it was # found at. + def search_with_source(pattern, only_platform = false, all = false) read_all_cache_data if all @@ -306,7 +308,7 @@ class Gem::SourceInfoCache # TODO - Remove this gunk after 2008/11 unless pattern.kind_of?(Gem::Dependency) - pattern = Gem::Dependency.new(pattern, Gem::Requirement.default) + pattern = Gem::Dependency.new(pattern, Gem::Requirement.default) end sic_entry.source_index.search(pattern, only_platform).each do |spec| |