diff --git a/lib/ext/git/grit.rb b/lib/ext/git/grit.rb index e484ebeb5..5e67c2d26 100644 --- a/lib/ext/git/grit.rb +++ b/lib/ext/git/grit.rb @@ -49,7 +49,7 @@ module Grit if mime_type == 'text/rpm-spec' @raw_mime_type = 'text/x-rpm-spec' else - @raw_mime_type = Linguist::Language.detect(name, data).try(:lexer).try(:mimetypes).try(:first) + @raw_mime_type = Linguist::Language.detect(self).try(:lexer).try(:mimetypes).try(:first) @raw_mime_type ||= DEFAULT_MIME_TYPE @raw_mime_type.gsub!('application', 'text') @raw_mime_type