Return nil if no Language is found

This commit is contained in:
Joshua Peek
2011-06-18 20:57:58 -05:00
parent 7c2a8874a3
commit 063bf21c66
3 changed files with 8 additions and 16 deletions

View File

@@ -256,7 +256,7 @@ module Linguist
language
# See if there is a Language for the extension
elsif language = Language.find_by_filename(pathname.to_s)
elsif language = pathname.language
language
# Try to detect Language from shebang line