aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-12-26 11:58:09 -0500
committerJack Nagel2014-12-26 11:58:09 -0500
commit370bcb0e05c0cf1fb86f19cd09bd420591e88183 (patch)
tree6f3fd54764d0b71a1b20982ef6f9aa486f2dba32 /Library
parent89f93423f4657d87c155bde83af9af0d765dd87d (diff)
downloadhomebrew-370bcb0e05c0cf1fb86f19cd09bd420591e88183.tar.bz2
Fix "possible reference to past scope" warnings on 2.2
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb4
-rw-r--r--Library/Homebrew/keg.rb12
-rw-r--r--Library/Homebrew/tab.rb2
3 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 09a651eaa..7cca75076 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -202,8 +202,8 @@ class FormulaInstaller
return if ARGV.force?
conflicts = formula.conflicts.select do |c|
- formula = Formulary.factory(c.name)
- formula.linked_keg.exist? && formula.opt_prefix.exist?
+ f = Formulary.factory(c.name)
+ f.linked_keg.exist? && f.opt_prefix.exist?
end
raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 0c87dfc8c..25656f25a 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -259,8 +259,8 @@ class Keg
link_dir('sbin', mode) {:skip_dir}
link_dir('include', mode) {:link}
- link_dir('share', mode) do |path|
- case path.to_s
+ link_dir('share', mode) do |relative_path|
+ case relative_path.to_s
when 'locale/locale.alias' then :skip_file
when INFOFILE_RX then :info
when LOCALEDIR_RX then :mkpath
@@ -273,8 +273,8 @@ class Keg
end
end
- link_dir('lib', mode) do |path|
- case path.to_s
+ link_dir('lib', mode) do |relative_path|
+ case relative_path.to_s
when 'charset.alias' then :skip_file
# pkg-config database gets explicitly created
when 'pkgconfig' then :mkpath
@@ -294,12 +294,12 @@ class Keg
end
end
- link_dir('Frameworks', mode) do |path|
+ link_dir('Frameworks', mode) do |relative_path|
# Frameworks contain symlinks pointing into a subdir, so we have to use
# the :link strategy. However, for Foo.framework and
# Foo.framework/Versions we have to use :mkpath so that multiple formulae
# can link their versions into it and `brew [un]link` works.
- if path.to_s =~ /[^\/]*\.framework(\/Versions)?$/
+ if relative_path.to_s =~ /[^\/]*\.framework(\/Versions)?$/
:mkpath
else
:link
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 29836365b..135a5dcfc 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -45,7 +45,7 @@ class Tab < OpenStruct
def self.remap_deprecated_options deprecated_options, options
deprecated_options.each do |deprecated_option|
- option = options.find {|option| option.name == deprecated_option.old }
+ option = options.find { |o| o.name == deprecated_option.old }
next unless option
options -= [option]
options << Option.new(deprecated_option.current, option.description)