aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands/lock_command.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
commitd22130922e7842226d38d59680e4bbb48a28a5f0 (patch)
tree39594d3a14641dd5488a99a5e633239296fa5742 /lib/rubygems/commands/lock_command.rb
parent4752539e3f3e563d559732c52424206bd6f12dbd (diff)
downloadruby-d22130922e7842226d38d59680e4bbb48a28a5f0.tar.gz
Import rubygems 1.8.5 (released @ 137c80f)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/lock_command.rb')
-rw-r--r--lib/rubygems/commands/lock_command.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rubygems/commands/lock_command.rb b/lib/rubygems/commands/lock_command.rb
index a17dd36d7a..9ce9da6899 100644
--- a/lib/rubygems/commands/lock_command.rb
+++ b/lib/rubygems/commands/lock_command.rb
@@ -93,7 +93,7 @@ lock it down to the exact version.
spec.runtime_dependencies.each do |dep|
next if locked[dep.name]
- candidates = Gem.source_index.search dep
+ candidates = dep.matching_specs
if candidates.empty? then
complain "Unable to satisfy '#{dep}' from currently installed gems"
@@ -105,11 +105,11 @@ lock it down to the exact version.
end
def spec_path(gem_full_name)
- gemspecs = Gem.path.map do |path|
+ gemspecs = Gem.path.map { |path|
File.join path, "specifications", "#{gem_full_name}.gemspec"
- end
+ }
- gemspecs.find { |gemspec| File.exist? gemspec }
+ gemspecs.find { |path| File.exist? path }
end
end