aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-08-07 10:39:08 -0500
committerJoshua Peek <josh@joshpeek.com>2012-08-07 10:39:08 -0500
commitdbb089f6104d60a14a4deafef044af825379186d (patch)
tree465fac03d65e93c8be9226e111c31b5ca3b7b7b3
parent23357736b12ffacd15b381412c5f49553e92cf3c (diff)
Fix nil data passed to generated
-rw-r--r--lib/linguist/generated.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb
index 1b05e91..25d36e4 100644
--- a/lib/linguist/generated.rb
+++ b/lib/linguist/generated.rb
@@ -37,7 +37,8 @@ module Linguist
#
# Returns an Array of lines
def lines
- @lines ||= data.split("\n", -1)
+ # TODO: data should be required to be a String, no nils
+ @lines ||= data ? data.split("\n", -1) : []
end
# Internal: Is the blob a generated file?