Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2017-06-06 19:40:07 +0300
committerRémy Coutable <remy@rymai.me>2017-06-06 19:40:07 +0300
commit6b53add3f93caffa830e3bdbb3d8fd8d674ee3aa (patch)
tree59f2cd2dc6b201124c4cb9cb526f578e091a5536 /lib/gitlab
parentb9fcc48aef1ea08df98f1955d118f1c1f03dc30c (diff)
Fix binary encoding error on MR diffs
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/encoding_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/encoding_helper.rb b/lib/gitlab/encoding_helper.rb
index dbe28e6bb93..781f9c56a42 100644
--- a/lib/gitlab/encoding_helper.rb
+++ b/lib/gitlab/encoding_helper.rb
@@ -38,7 +38,7 @@ module Gitlab
def encode_utf8(message)
detect = CharlockHolmes::EncodingDetector.detect(message)
- if detect
+ if detect && detect[:encoding]
begin
CharlockHolmes::Converter.convert(message, detect[:encoding], 'UTF-8')
rescue ArgumentError => e