From 15e145709bb4a7ccf3095b51e6826b1d97a22ec9 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 20 Feb 2010 02:07:51 +0000 Subject: [PATCH] Fix inreplace barfing over Pathnames This fix should be fairly tolerant of types. --- Library/Homebrew/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 911fe488fc..ee36823771 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -195,7 +195,7 @@ module HomebrewInreplaceExtension end def inreplace path, before=nil, after=nil - path.each do |path| + [*path].each do |path| f = File.open(path, 'r') s = f.read