diff options
| author | Joshua Peek <josh@joshpeek.com> | 2012-08-07 10:39:08 -0500 |
|---|---|---|
| committer | Joshua Peek <josh@joshpeek.com> | 2012-08-07 10:39:08 -0500 |
| commit | dbb089f6104d60a14a4deafef044af825379186d (patch) | |
| tree | 465fac03d65e93c8be9226e111c31b5ca3b7b7b3 | |
| parent | 23357736b12ffacd15b381412c5f49553e92cf3c (diff) | |
Fix nil data passed to generated
| -rw-r--r-- | lib/linguist/generated.rb | 3 |
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? |
