diff options
| author | Misty De Meo | 2016-11-03 16:43:31 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2016-11-10 15:08:36 -0800 | 
| commit | b6acb9cb47817631a69fba31a4cab2cae30da01b (patch) | |
| tree | 07eab4129fddcb04da094fe72c729c1cec2a916b /Library/Homebrew/version.rb | |
| parent | fbcf500a48bd8a6be2f009c35be5ae971e841b87 (diff) | |
| download | brew-b6acb9cb47817631a69fba31a4cab2cae30da01b.tar.bz2 | |
Version: allow comparing against nil
Diffstat (limited to 'Library/Homebrew/version.rb')
| -rw-r--r-- | Library/Homebrew/version.rb | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index 57a9c11a5..56ffc9a64 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -213,6 +213,8 @@ class Version    end    def <=>(other) +    return 1 if other.nil? +      return unless other.is_a?(Version)      return 0 if version == other.version      return 1 if head? && !other.head?  | 
