summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-25 01:35:40 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-25 01:35:40 +0900
commitf9c9daac780666dbd2ce4ad6270c66e1ee32545a (patch)
treec9d42ba59facb728094a2da1fcd26bd931a2f57a
parentcf4ab10d71ea03c83fad22abf70dac21bbf73e72 (diff)
downloadgitlab-ce-f9c9daac780666dbd2ce4ad6270c66e1ee32545a.tar.gz
Resolve static analysys. Use until instead of negative while
-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 c5a1ddfe691..c4c0623df6c 100644
--- a/lib/gitlab/ci/trace/stream.rb
+++ b/lib/gitlab/ci/trace/stream.rb
@@ -99,7 +99,7 @@ module Gitlab
stream.seek(0, IO::SEEK_END)
debris = ''
- while !(buf = read_backward(BUFFER_SIZE)).empty?
+ until (buf = read_backward(BUFFER_SIZE)).empty?
buf += debris
debris, *lines = buf.each_line.to_a
lines.reverse_each do |line|
@@ -107,7 +107,7 @@ module Gitlab
end
end
- yield(debris.force_encoding('UTF-8')) if !(debris).empty?
+ yield(debris.force_encoding('UTF-8')) unless debris.empty?
end
def read_backward(length)