Avoid using singular #extension

This commit is contained in:
Brandon Keepers
2014-11-17 15:47:21 -05:00
parent c46667581d
commit 6c106b88c0

View File

@@ -110,8 +110,8 @@ module Linguist
# A bit of an elegant hack. If the file is executable but extensionless,
# append a "magic" extension so it can be classified with other
# languages that have shebang scripts.
extension = FileBlob.new(name).extension
if extension.empty? && blob.mode && (blob.mode.to_i(8) & 05) == 05
extensions = FileBlob.new(name).extensions
if extensions.empty? && blob.mode && (blob.mode.to_i(8) & 05) == 05
name += ".script!"
end