Clean up heuristic logic

This commit is contained in:
Brandon Keepers
2014-11-28 17:03:01 -06:00
parent 4bebcef6ef
commit c038b51941

View File

@@ -18,9 +18,7 @@ module Linguist
data = blob.data data = blob.data
@heuristics.each do |heuristic| @heuristics.each do |heuristic|
if heuristic.matches?(languages) && result = heuristic.call(data) return Array(heuristic.call(data)) if heuristic.matches?(languages)
return Array(result)
end
end end
[] # No heuristics matched [] # No heuristics matched