summaryrefslogtreecommitdiff
path: root/lib/rubygems/request_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/request_set.rb')
-rw-r--r--lib/rubygems/request_set.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rubygems/request_set.rb b/lib/rubygems/request_set.rb
index 05bfcbe..819a1d8 100644
--- a/lib/rubygems/request_set.rb
+++ b/lib/rubygems/request_set.rb
@@ -116,7 +116,7 @@ class Gem::RequestSet
if dep = @dependency_names[name] then
dep.requirement.concat reqs
else
- dep = Gem::Dependency.new name, reqs
+ dep = Gem::Dependency.new name, *reqs
@dependency_names[name] = dep
@dependencies << dep
end
@@ -275,8 +275,13 @@ class Gem::RequestSet
@git_set.root_dir = @install_dir
- lockfile = Gem::RequestSet::Lockfile.new self, path
- lockfile.parse
+ lock_file = "#{File.expand_path(path)}.lock"
+ begin
+ tokenizer = Gem::RequestSet::Lockfile::Tokenizer.from_file lock_file
+ parser = tokenizer.make_parser self, []
+ parser.parse
+ rescue Errno::ENOENT
+ end
gf = Gem::RequestSet::GemDependencyAPI.new self, path
gf.installing = installing
@@ -411,3 +416,4 @@ end
require 'rubygems/request_set/gem_dependency_api'
require 'rubygems/request_set/lockfile'
+require 'rubygems/request_set/lockfile/tokenizer'