diff options
| author | Jack Nagel | 2014-02-09 14:23:56 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-09 14:23:56 -0500 |
| commit | ce3ae1fd92139044919e027516bd5ded161fd819 (patch) | |
| tree | 22379bbd428d80b2c0b988819568e07841411800 /Library/Homebrew/requirements | |
| parent | aee5c113bf706938dd8863e9facf2d3722a516ef (diff) | |
| download | homebrew-ce3ae1fd92139044919e027516bd5ded161fd819.tar.bz2 | |
X11Dependency: return nil instead of raising in #<=>
Returning nil is in the contract of the Comparable module, and a future
version of Ruby will no longer hide this error.
Diffstat (limited to 'Library/Homebrew/requirements')
| -rw-r--r-- | Library/Homebrew/requirements/x11_dependency.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/requirements/x11_dependency.rb b/Library/Homebrew/requirements/x11_dependency.rb index 5eb14354d..35e9be723 100644 --- a/Library/Homebrew/requirements/x11_dependency.rb +++ b/Library/Homebrew/requirements/x11_dependency.rb @@ -27,9 +27,7 @@ class X11Dependency < Requirement end def <=> other - unless other.is_a? X11Dependency - raise TypeError, "expected X11Dependency" - end + return nil unless X11Dependency === other if min_version.nil? && other.min_version.nil? 0 |
