From f279a1397733c81a580bd21ebef9815fb290a8a5 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 5 Sep 2015 14:36:50 +0800 Subject: [PATCH] formula_installer: fix syntax warning Library/Homebrew/formula_installer.rb:636: warning: shadowing outer local variable - conflict_file Library/Homebrew/formula_installer.rb:636: warning: shadowing outer local variable - backup_file Closes Homebrew/homebrew#43602. Signed-off-by: Xu Cheng --- Library/Homebrew/formula_installer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 7395edc49c..fb2c023d2b 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -583,7 +583,7 @@ class FormulaInstaller keg.remove_linked_keg_record end - link_overwrite_backup = {} # dict: conflict file -> backup file + link_overwrite_backup = {} # Hash: conflict file -> backup file backup_dir = HOMEBREW_CACHE/"Backup" begin @@ -623,9 +623,9 @@ class FormulaInstaller @show_summary_heading = true ignore_interrupts do keg.unlink - link_overwrite_backup.each do |conflict_file, backup_file| - conflict_file.parent.mkpath - backup_file.rename conflict_file + link_overwrite_backup.each do |origin, backup| + origin.parent.mkpath + backup.rename origin end end Homebrew.failed = true