From b0ece7613fe2a41f394666bf2946dd03fc2ea30b Mon Sep 17 00:00:00 2001 From: LeFnord Date: Fri, 17 Feb 2012 21:18:37 +0100 Subject: [PATCH] cast `name` to string Some times a Pathname is passed in here Signed-off-by: Adam Vandenberg --- Library/Homebrew/formula.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 512dafaf04..d6a80ddc1e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -347,6 +347,9 @@ class Formula # If an instance of Formula is passed, just return it return name if name.kind_of? Formula + # Otherwise, convert to String in case a Pathname comes in + name = name.to_s + # If a URL is passed, download to the cache and install if name =~ %r[(https?|ftp)://] url = name