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:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-04 22:32:57 +0300
committermicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-06 16:01:53 +0300
commitdbaed90c8d3dffb2dd970f1621f551dd322db5ee (patch)
tree61f3a92dff29e8229a224da5e864f5504bf366ab /lib/gitlab/encoding_helper.rb
parent5625b0e4534de834235ce5dbeef89a5e976b698c (diff)
fix refactoring error with Blob.binary?
remove some lint
Diffstat (limited to 'lib/gitlab/encoding_helper.rb')
-rw-r--r--lib/gitlab/encoding_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/encoding_helper.rb b/lib/gitlab/encoding_helper.rb
index 21a14141c87..8ac756a0b6a 100644
--- a/lib/gitlab/encoding_helper.rb
+++ b/lib/gitlab/encoding_helper.rb
@@ -14,7 +14,7 @@ module Gitlab
ENCODING_CONFIDENCE_THRESHOLD = 50
#
- #
+ #
def encode!(message)
return nil unless message.respond_to? :force_encoding
@@ -33,12 +33,12 @@ module Gitlab
# encode and clean the bad chars
message.replace clean(message)
- rescue => e
+ rescue
encoding = detect ? detect[:encoding] : "unknown"
"--broken encoding: #{encoding}"
end
- def all_binary?(data, detect=nil)
+ def all_binary?(data, detect = nil)
detect ||= CharlockHolmes::EncodingDetector.detect(data)
detect && detect[:type] == :binary
end
@@ -65,7 +65,7 @@ module Gitlab
clean(message)
end
end
-
+
private
def clean(message)