From 01deb07ae9334253a55147591e804047b7782d19 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 14 Mar 2015 20:19:11 -0500 Subject: [PATCH] Return false for empty file. --- lib/linguist/generated.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 4a67fabd..a87bbc90 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -281,6 +281,7 @@ module Linguist # Return true or false def compiled_cython_file? return false unless ['.c', '.cpp'].include? extname + return false unless lines.count > 1 return lines[0].include?("Generated by Cython") end end