Return early for the == case in Version#<=>
This commit is contained in:
parent
68c7e1e30c
commit
38a8c54898
@ -197,7 +197,7 @@ class Version
|
||||
|
||||
def <=>(other)
|
||||
return unless Version === other
|
||||
return 0 if head? && other.head?
|
||||
return 0 if version == other.version
|
||||
return 1 if head? && !other.head?
|
||||
return -1 if !head? && other.head?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user