Prefer Dir.glob when iterating over the result
This commit is contained in:
		
							parent
							
								
									099c8c15ae
								
							
						
					
					
						commit
						bf365fc23b
					
				@ -71,7 +71,7 @@ module Homebrew extend self
 | 
			
		||||
  def repair_taps
 | 
			
		||||
    count = 0
 | 
			
		||||
    # prune dead symlinks in Formula
 | 
			
		||||
    Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].each do |fn|
 | 
			
		||||
    Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
 | 
			
		||||
      if not File.exist? fn
 | 
			
		||||
        File.delete fn
 | 
			
		||||
        count += 1
 | 
			
		||||
 | 
			
		||||
@ -96,7 +96,7 @@ module Homebrew extend self
 | 
			
		||||
 | 
			
		||||
  def rename_taps_dir_if_necessary
 | 
			
		||||
    need_repair_taps = false
 | 
			
		||||
    Dir["#{HOMEBREW_LIBRARY}/Taps/*/"].each do |tapd|
 | 
			
		||||
    Dir.glob("#{HOMEBREW_LIBRARY}/Taps/*/") do |tapd|
 | 
			
		||||
      begin
 | 
			
		||||
        tapd_basename = File.basename(tapd)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user