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
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-17 11:53:31 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-24 14:10:14 +0300
commit318b46407239f35cd11d35b21271fa743d435dad (patch)
tree7b16e1abb2bebb7062ed2c9ddb36dd6517c9d205 /lib
parenta6f6056c62693f18d9a2da570578b2e19aa20afe (diff)
Use force_encoding(regex.encoding)
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/trace/stream.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/trace/stream.rb b/lib/gitlab/ci/trace/stream.rb
index 233cc5c1c7a..3b4728951c4 100644
--- a/lib/gitlab/ci/trace/stream.rb
+++ b/lib/gitlab/ci/trace/stream.rb
@@ -74,7 +74,7 @@ module Gitlab
match = ""
reverse_line do |line|
- matches = line.force_encoding(Encoding.default_external).scan(regex)
+ matches = line.force_encoding(regex.encoding).scan(regex)
next unless matches.is_a?(Array)
next if matches.empty?
@@ -86,7 +86,7 @@ module Gitlab
nil
rescue
# if bad regex or something goes wrong we dont want to interrupt transition
- # so we just silentrly ignore error for now
+ # so we just silently ignore error for now
end
private