no, you don't

This commit is contained in:
Seth Thomas Rasmussen 2010-02-02 16:10:53 -05:00
parent 49df0bb77a
commit 685d28e6e4

View File

@ -231,9 +231,10 @@ module Rails
def extract_filenames_from_grep(output)
return nil if output.empty?
# I hate rescue nil as much as the next guy but I have a reason here at least...
fnames = output.split("\n").map do |fn|
fn.match(/^(.+?):/)[1] rescue nil
if m = fn.match(/^(.+?):/)
m[1]
end
end.compact
fnames.uniq