From f037be514865a8dc141b7c870e7640939b5fa22a Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Feb 2013 22:54:43 -0600 Subject: Don't shadow outer local variables --- Library/Homebrew/cmd/doctor.rb | 2 +- Library/Homebrew/cmd/prune.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 32f3f5288..b6f616ec3 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -607,7 +607,7 @@ def check_for_config_scripts configs = Dir["#{p}/*-config"] # puts "#{p}\n #{configs * ' '}" unless configs.empty? - config_scripts << [p, configs.collect {|p| File.basename(p)}] unless configs.empty? + config_scripts << [p, configs.map { |c| File.basename(c) }] unless configs.empty? end unless config_scripts.empty? diff --git a/Library/Homebrew/cmd/prune.rb b/Library/Homebrew/cmd/prune.rb index 29e57ee3e..e2c4ef310 100644 --- a/Library/Homebrew/cmd/prune.rb +++ b/Library/Homebrew/cmd/prune.rb @@ -9,9 +9,9 @@ module Homebrew extend self $d = 0 dirs = [] - Keg::PRUNEABLE_DIRECTORIES.each do |path| - next unless path.directory? - path.find do |path| + Keg::PRUNEABLE_DIRECTORIES.each do |dir| + next unless dir.directory? + dir.find do |path| path.extend ObserverPathnameExtension if path.symlink? unless path.resolved_path_exists? -- cgit v1.2.3