Allow disambiguate to return an Array

This commit is contained in:
Brandon Keepers
2014-11-28 16:55:00 -06:00
parent b8685103d0
commit 4bebcef6ef

View File

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