summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb')
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb
index 88d109c94f..b5a0688a32 100644
--- a/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb
+++ b/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb
@@ -81,6 +81,7 @@ module Gem::Resolver::Molinillo
# @return [Boolean] whether the two vertices are equal, determined
# by a recursive traversal of each {Vertex#successors}
def ==(other)
+ return true if equal?(other)
shallow_eql?(other) &&
successors.to_set == other.successors.to_set
end
@@ -89,6 +90,7 @@ module Gem::Resolver::Molinillo
# @return [Boolean] whether the two vertices are equal, determined
# solely by {#name} and {#payload} equality
def shallow_eql?(other)
+ return true if equal?(other)
other &&
name == other.name &&
payload == other.payload