Fix empty .m file

This commit is contained in:
Joshua Peek
2012-05-09 09:52:14 -05:00
parent f56fbffa6d
commit 35fe44549e
3 changed files with 2 additions and 1 deletions

View File

@@ -470,7 +470,7 @@ module Linguist
Language['Objective-C']
# Matlab file function or class or comments
elsif lines.first.grep(/^\s*(function |classdef )/).any? || lines.grep(/^\s*%/).any?
elsif lines.any? && lines.first.grep(/^\s*(function |classdef )/).any? || lines.grep(/^\s*%/).any?
Language['Matlab']
# Fallback to Objective-C, don't want any Matlab false positives