summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-12-07 20:35:39 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-12-07 20:35:39 +0000
commit7838317a14ddb686a16e914f9dbfb393a6bf5099 (patch)
treecdf70f6f056cff84ba9490c9399673ccdf3cb56f /lib
parentaf4d4e7067525e02eb2c17d2d0c524621c8ed345 (diff)
parentb7a5125f02865637ffbd4d7f8a623c994b861f0e (diff)
downloadgitlab-ce-7838317a14ddb686a16e914f9dbfb393a6bf5099.tar.gz
Merge branch 'fix_39233' into 'master'
fix #39233 - 500 in merge request Closes #39233 See merge request gitlab-org/gitlab-ce!15774
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/inline_diff.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/inline_diff.rb b/lib/gitlab/diff/inline_diff.rb
index 2d7b57120a6..54783a07919 100644
--- a/lib/gitlab/diff/inline_diff.rb
+++ b/lib/gitlab/diff/inline_diff.rb
@@ -70,7 +70,7 @@ module Gitlab
def find_changed_line_pairs(lines)
# Prefixes of all diff lines, indicating their types
# For example: `" - + -+ ---+++ --+ -++"`
- line_prefixes = lines.each_with_object("") { |line, s| s << line[0] }.gsub(/[^ +-]/, ' ')
+ line_prefixes = lines.each_with_object("") { |line, s| s << (line[0] || ' ') }.gsub(/[^ +-]/, ' ')
changed_line_pairs = []
line_prefixes.scan(LINE_PAIRS_PATTERN) do