Only read lines if blob is viewable

This commit is contained in:
Joshua Peek
2011-05-25 13:29:47 -05:00
parent ac8e66a388
commit 9cbddb8293

View File

@@ -124,7 +124,7 @@ module Linguist
# #
# Returns an Array of lines # Returns an Array of lines
def lines def lines
@lines ||= data ? data.split("\n", -1) : [] @lines ||= (viewable? && data) ? data.split("\n", -1) : []
end end
# Public: Get number of lines of code # Public: Get number of lines of code