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
commit38a8c54898b225afe30d1272b8899763bb6e76da (patch)
tree3d9bc88002cd4273cfc5ab0c8ced8ae38f400e9d /Library
parent68c7e1e30cbb96eee50472c19f866414188a5d65 (diff)
downloadbrew-38a8c54898b225afe30d1272b8899763bb6e76da.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?