Soften memory pressure

This commit is contained in:
Vicent Marti
2015-09-04 10:24:06 +02:00
parent bdd57f58a0
commit b275b5d728
4 changed files with 17 additions and 5 deletions

View File

@@ -56,7 +56,8 @@ module Linguist
# Internal: Check if this heuristic matches the candidate languages.
def matches?(filename)
@extensions.any? { |ext| filename.downcase.end_with?(ext) }
filename = filename.downcase
@extensions.any? { |ext| filename.end_with?(ext) }
end
# Internal: Perform the heuristic