lib/rubygems/requirement.rb
##
# Formats this requirement for use in a Gem::RequestSet::Lockfile.
Formats this requirement for use in a Gem::RequestSet::Lockfile.
Formats this requirement for use in a Gem :: RequestSet :: Lockfile .
def for_lockfile 
    return if [DefaultRequirement] == @requirements
    list = requirements.sort_by do |_, version|
      version
    end.map do |op, version|
      "#{op} #{version}"
    end.uniq
    " (#{list.join ', '})"
  end
def for_lockfile return if [ DefaultRequirement ] == @requirements list = requirements . sort_by do | _ , version | version end . map do | op , version | "#{op} #{version}" end . uniq " (#{list.join ', '})" end
Formats this requirement for use in a Gem::RequestSet::Lockfile.
Formats this requirement for use in a Gem :: RequestSet :: Lockfile .
# :nodoc: