Return false if RHS does not implement hash_code

This commit is contained in:
Chris Roberts 2022-06-13 17:00:51 -07:00
parent 45b9c48f03
commit 9da90f0b21

View File

@ -48,6 +48,7 @@ module VagrantPlugins
# @param [Vertex]
# @return [Boolean]
def ==(v)
return false if !v.respond_to?(:hash_code)
v.hash_code == hash_code
end
alias_method :eql?, :==