From 136aa4c6f45ca7f4cb1c691ffb5ccb53f1eef165 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 10 Apr 2013 11:52:54 -0500 Subject: [PATCH] Remove last use of deprecated Formula#recursive_deps Fixes Homebrew/homebrew#19107. --- Library/Homebrew/cmd/irb.rb | 2 +- Library/Homebrew/compat/compatibility.rb | 15 --------------- Library/Homebrew/formula_installer.rb | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Library/Homebrew/cmd/irb.rb b/Library/Homebrew/cmd/irb.rb index 0755ecda8c..76e7e55696 100644 --- a/Library/Homebrew/cmd/irb.rb +++ b/Library/Homebrew/cmd/irb.rb @@ -19,7 +19,7 @@ module Homebrew extend self puts "'v8'.f # => instance of the Ack formula" puts ":hub.f.installed?" puts ":lua.f.methods - 1.methods" - puts ":mpd.f.recursive_deps.reject{|f| f.installed? }" + puts ":mpd.f.recursive_dependencies.reject(&:installed?)" else ohai "Interactive Homebrew Shell" puts "Example commands available with: brew irb --help" diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index 6a473be479..941b078cc4 100644 --- a/Library/Homebrew/compat/compatibility.rb +++ b/Library/Homebrew/compat/compatibility.rb @@ -100,21 +100,6 @@ class Formula end end - # These methods return lists of Formula objects. - # They are eprecated in favor of Dependency::expand_dependencies - # and Formula#recursive_dependencies, which return lists of - # Dependency objects instead. - def self.expand_deps f - f.deps.map do |dep| - f_dep = Formula.factory dep.to_s - expand_deps(f_dep) << f_dep - end - end - - def recursive_deps - Formula.expand_deps(self).flatten.uniq - end - def self.all opoo "Formula.all is deprecated, use Formula.map instead" map diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6bb4903b89..e397195ef3 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -81,7 +81,7 @@ class FormulaInstaller unless ignore_deps # HACK: If readline is present in the dependency tree, it will clash # with the stdlib's Readline module when the debugger is loaded - if f.recursive_deps.any? { |d| d.name == "readline" } and ARGV.debug? + if f.recursive_dependencies.any? { |d| d.name == "readline" } and ARGV.debug? ENV['HOMEBREW_NO_READLINE'] = '1' end