class Bundler::LockfileGenerator
def add_section(name, value)
def add_section(name, value) out << "\n#{name}\n" case value when Array value.map(&:to_s).sort.each do |val| out << " #{val}\n" end when Hash value.to_a.sort_by {|k, _| k.to_s }.each do |key, val| out << " #{key}: #{val}\n" end when String out << " #{value}\n" else raise ArgumentError, "#{value.inspect} can't be serialized in a lockfile" end end