outdated: always do comparisons with a Formula as the receiver
It is possible for the object returned by Formula#version to be a subclass of Version with special behavior, so we want to use that for the comparison.
This commit is contained in:
		
							parent
							
								
									e0c4fd5b72
								
							
						
					
					
						commit
						8b763acc2a
					
				@ -16,7 +16,7 @@ module Homebrew extend self
 | 
				
			|||||||
  def outdated_brews
 | 
					  def outdated_brews
 | 
				
			||||||
    Formula.installed.map do |f|
 | 
					    Formula.installed.map do |f|
 | 
				
			||||||
      kegs = f.rack.subdirs.map { |d| Keg.new(d) }
 | 
					      kegs = f.rack.subdirs.map { |d| Keg.new(d) }
 | 
				
			||||||
      unless kegs.any? { |keg| keg.version >= f.version }
 | 
					      if kegs.all? { |k| f.version > k.version }
 | 
				
			||||||
        yield f if block_given?
 | 
					        yield f if block_given?
 | 
				
			||||||
        f
 | 
					        f
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user