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/parser.rb, line 297
def parse_dependency name, op # :nodoc:
return Gem::Dependency.new name, op unless peek[0] == :text
version = get(:text).value
requirements = ["#{op} #{version}"]
while peek.type == :comma do
get :comma
op = get(:requirement).value
version = get(:text).value
requirements << "#{op} #{version}"
end
Gem::Dependency.new name, requirements
end