ignore comments

This commit is contained in:
Seth Thomas Rasmussen 2010-02-04 22:21:58 -05:00
parent 685d28e6e4
commit 8ea7166feb
1 changed files with 6 additions and 1 deletions

View File

@ -185,11 +185,16 @@ module Rails
# If they're on Windows, they probably don't have grep.
@probably_has_grep ||= (Config::CONFIG['host_os'].downcase =~ /mswin|windows|mingw/).nil?
if @probably_has_grep
lines = if @probably_has_grep
find_with_grep(text, base_path + where)
else
find_with_rak(text, base_path + where)
end
# ignore comments
lines.gsub! /^\s*#.+$/m, ""
lines
end
# Sets a base path for finding files; mostly for testing