From acc33a56e726367d4f0eaee540adc9081ef172bf Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Mon, 26 Dec 2011 11:52:33 -0800 Subject: Allow Formula.canonical_name to use Pathname objects --- Library/Homebrew/formula.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index f10bffa86..9b3c0ac5f 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -397,6 +397,9 @@ class Formula end def self.canonical_name name + # Cast pathnames to strings. + name = name.to_s if name.kind_of? Pathname + formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb" possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases/#{name}" possible_cached_formula = HOMEBREW_CACHE_FORMULA+"#{name}.rb" -- cgit v1.2.3