Skip to content
Snippets Groups Projects
Commit f16003f5 authored by Jack Nagel's avatar Jack Nagel
Browse files

X11Dependency: return nil instead of raising in #<=>

Returning nil is in the contract of the Comparable module, and a future
version of Ruby will no longer hide this error.
parent e93792fd
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,7 @@ class X11Dependency < Requirement
end
def <=> other
unless other.is_a? X11Dependency
raise TypeError, "expected X11Dependency"
end
return nil unless X11Dependency === other
if min_version.nil? && other.min_version.nil?
0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment