From bdee729a41fbaec0607f26749cc09730792ec77e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 25 Apr 2014 18:58:16 -0500 Subject: Yield absolute paths from find_formula --- Library/Homebrew/extend/pathname.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 9bd1275fd..c11775507 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -321,8 +321,8 @@ class Pathname def find_formula [self/:Formula, self/:HomebrewFormula, self].each do |d| if d.exist? - d.children.map{ |child| child.relative_path_from(self) }.each do |pn| - yield pn if pn.to_s =~ /.rb$/ + d.children.each do |pn| + yield pn if pn.extname == ".rb" end break end -- cgit v1.2.3