lib/bundler/lazy_specification.rb in bundler-1.11.2 vs lib/bundler/lazy_specification.rb in bundler-1.12.0.pre.1

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true require "uri" require "rubygems/spec_fetcher" require "bundler/match_platform" module Bundler @@ -33,13 +34,15 @@ def satisfies?(dependency) @name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version)) end def to_lock + out = String.new + if platform == Gem::Platform::RUBY || platform.nil? - out = " #{name} (#{version})\n" + out << " #{name} (#{version})\n" else - out = " #{name} (#{version}-#{platform})\n" + out << " #{name} (#{version}-#{platform})\n" end dependencies.sort_by(&:to_s).uniq.each do |dep| next if dep.type == :development out << " #{dep.to_lock}\n"