From 6c106b88c05cdf36c609c55d4029735372b22c5c Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Mon, 17 Nov 2014 15:47:21 -0500 Subject: [PATCH] Avoid using singular #extension --- lib/linguist/language.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 2794c23f..53ce777e 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -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