formula: fix to_hash tampering with requirement names
				
					
				
			This commit is contained in:
		
							parent
							
								
									2a417f1416
								
							
						
					
					
						commit
						5619e5cc2c
					
				@ -2156,9 +2156,10 @@ class Formula
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hsh["requirements"] = requirements.map do |req|
 | 
					    hsh["requirements"] = requirements.map do |req|
 | 
				
			||||||
      req.name.prepend("maximum_") if req.try(:comparator) == "<="
 | 
					      req_name = req.name.dup
 | 
				
			||||||
 | 
					      req_name.prepend("maximum_") if req.try(:comparator) == "<="
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        "name"     => req.name,
 | 
					        "name"     => req_name,
 | 
				
			||||||
        "cask"     => req.cask,
 | 
					        "cask"     => req.cask,
 | 
				
			||||||
        "download" => req.download,
 | 
					        "download" => req.download,
 | 
				
			||||||
        "version"  => req.try(:version) || req.try(:arch),
 | 
					        "version"  => req.try(:version) || req.try(:arch),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user