summaryrefslogtreecommitdiff
path: root/lib/bundler/resolver/candidate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/resolver/candidate.rb')
-rw-r--r--lib/bundler/resolver/candidate.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/bundler/resolver/candidate.rb b/lib/bundler/resolver/candidate.rb
index 681f9aca73..9e8b913335 100644
--- a/lib/bundler/resolver/candidate.rb
+++ b/lib/bundler/resolver/candidate.rb
@@ -15,7 +15,7 @@ module Bundler
# considered separately.
#
# Some candidates may also keep some information explicitly about the
- # package the refer to. These candidates are referred to as "canonical" and
+ # package they refer to. These candidates are referred to as "canonical" and
# are used when materializing resolution results back into RubyGems
# specifications that can be installed, written to lock files, and so on.
#
@@ -26,9 +26,8 @@ module Bundler
def initialize(version, specs: [])
@spec_group = Resolver::SpecGroup.new(specs)
- @platforms = specs.map(&:platform).sort_by(&:to_s).uniq
@version = Gem::Version.new(version)
- @ruby_only = @platforms == [Gem::Platform::RUBY]
+ @ruby_only = specs.map(&:platform).uniq == [Gem::Platform::RUBY]
end
def dependencies
@@ -88,9 +87,7 @@ module Bundler
end
def to_s
- return @version.to_s if @platforms.empty? || @ruby_only
-
- "#{@version} (#{@platforms.join(", ")})"
+ @version.to_s
end
end
end