diff options
| author | Jack Nagel | 2014-04-25 18:58:16 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-25 18:58:16 -0500 |
| commit | 35fb78a1c82b6ca3f8cbfd63a8ba4e5d70fdb3ae (patch) | |
| tree | e6b1f24f64f202d02811ffff26ebf8581f1d71ca /Library/Homebrew/extend | |
| parent | 52988fb6350c351323cc77e99577eca9bf955e57 (diff) | |
| download | homebrew-35fb78a1c82b6ca3f8cbfd63a8ba4e5d70fdb3ae.tar.bz2 | |
Yield absolute paths from find_formula
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
