Parses the requirements following the dependency name and the
op for the first token of the requirements and returns a Gem::Dependency object.
# File lib/rubygems/request_set/lockfile.rb, line 487
def parse_dependency name, op # :nodoc:
return Gem::Dependency.new name, op unless peek[0] == :text
_, version, = get :text
requirements = ["#{op} #{version}"]
while peek[0] == :comma do
get :comma
_, op, = get :requirement
_, version, = get :text
requirements << "#{op} #{version}"
end
Gem::Dependency.new name, requirements
end