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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 12:03:43 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 12:03:43 +0300
commitd1311119faeedaf163cfba7020dbcab33fb9308f (patch)
tree3c136f24a2cfd35dd962d00e864eb1bbe9a38089 /lib/gitlab/utils.rb
parent777b6713bb473d2e09c8340ab9a96373fdbaae50 (diff)
Fix static analysis in utf8 helper methods
Diffstat (limited to 'lib/gitlab/utils.rb')
-rw-r--r--lib/gitlab/utils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/utils.rb b/lib/gitlab/utils.rb
index ad2efa6b4e1..41ed1dc5605 100644
--- a/lib/gitlab/utils.rb
+++ b/lib/gitlab/utils.rb
@@ -19,7 +19,7 @@ module Gitlab
def ensure_utf8_size(str, bytes:)
raise ArgumentError if str.empty? || bytes.negative?
- truncated = str.each_char.each_with_object(String.new) do |char, object|
+ truncated = str.each_char.each_with_object(+'') do |char, object|
if object.bytesize + char.bytesize > bytes
break object
else