From 38a8c54898b225afe30d1272b8899763bb6e76da Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 17 Mar 2015 21:37:03 -0400 Subject: Return early for the == case in Version#<=> --- Library/Homebrew/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') 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? -- cgit v1.2.3