diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-03-15 19:51:27 -0500 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-03-15 19:51:27 -0500 |
commit | 7e03b40221388bd0567be6609f2ededa7f934179 (patch) | |
tree | 2158edc267c768e6d109522a07f60978b3930167 /lib | |
parent | 64d0dd1807c75be21a8f5bfe3a74b9230b5b8979 (diff) | |
download | gitlab-ce-7e03b40221388bd0567be6609f2ededa7f934179.tar.gz |
Return an empty Array when there aren't lines to parse.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/parser.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/diff/parser.rb b/lib/gitlab/diff/parser.rb index d0f6ba23ab4..d0815fc7eea 100644 --- a/lib/gitlab/diff/parser.rb +++ b/lib/gitlab/diff/parser.rb @@ -4,6 +4,8 @@ module Gitlab include Enumerable def parse(lines) + return [] if lines.blank? + @lines = lines line_obj_index = 0 line_old = 1 |