summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 12:45:11 +0300
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 13:50:41 +0300
commit56660de3c6df7a4ff8667ef4047d30d0de169935 (patch)
treedd1e526075687b4b24e089cee50eabc21a6143cc /lib/rubygems/resolver
parent560cd5b1f04f30542a294b3d77527d3b12f7cc15 (diff)
Merge rubygems master from upstream.
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
Diffstat (limited to 'lib/rubygems/resolver')
-rw-r--r--lib/rubygems/resolver/activation_request.rb49
1 files changed, 3 insertions, 46 deletions
diff --git a/lib/rubygems/resolver/activation_request.rb b/lib/rubygems/resolver/activation_request.rb
index 7fbabbff50..2a8d6032f8 100644
--- a/lib/rubygems/resolver/activation_request.rb
+++ b/lib/rubygems/resolver/activation_request.rb
@@ -18,14 +18,10 @@ class Gem::Resolver::ActivationRequest
##
# Creates a new ActivationRequest that will activate +spec+. The parent
# +request+ is used to provide diagnostics in case of conflicts.
- #
- # +others_possible+ indicates that other specifications may also match this
- # activation request.
- def initialize(spec, request, others_possible = true)
+ def initialize(spec, request)
@spec = spec
@request = request
- @others_possible = others_possible
end
def ==(other) # :nodoc:
@@ -90,21 +86,8 @@ class Gem::Resolver::ActivationRequest
end
def inspect # :nodoc:
- others =
- case @others_possible
- when true then # TODO remove at RubyGems 3
- ' (others possible)'
- when false then # TODO remove at RubyGems 3
- nil
- else
- unless @others_possible.empty?
- others = @others_possible.map { |s| s.full_name }
- " (others possible: #{others.join ', '})"
- end
- end
-
- '#<%s for %p from %s%s>' % [
- self.class, @spec, @request, others
+ '#<%s for %p from %s>' % [
+ self.class, @spec, @request
]
end
@@ -132,19 +115,6 @@ class Gem::Resolver::ActivationRequest
end
##
- # Indicate if this activation is one of a set of possible
- # requests for the same Dependency request.
-
- def others_possible?
- case @others_possible
- when true, false then
- @others_possible
- else
- not @others_possible.empty?
- end
- end
-
- ##
# Return the ActivationRequest that contained the dependency
# that we were activated for.
@@ -160,19 +130,6 @@ class Gem::Resolver::ActivationRequest
q.breakable
q.text ' for '
q.pp @request
-
- case @others_possible
- when false then
- when true then
- q.breakable
- q.text 'others possible'
- else
- unless @others_possible.empty?
- q.breakable
- q.text 'others '
- q.pp @others_possible.map { |s| s.full_name }
- end
- end
end
end