aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-03-17 21:37:03 -0400
committerJack Nagel2015-03-17 21:37:03 -0400
commit0faf90560ac8683662ca6aa034f46edd108557a4 (patch)
treeb40468b2fae5d3494b253ec0cdaa0ab09415b48e /Library
parent42da590f7b91fad4feda06aeec1d805496393f9c (diff)
downloadhomebrew-0faf90560ac8683662ca6aa034f46edd108557a4.tar.bz2
Return early for the == case in Version#<=>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/version.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index be74a2cc7..5dcfced59 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -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?