diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-25 01:35:40 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-25 01:35:40 +0900 |
commit | f9c9daac780666dbd2ce4ad6270c66e1ee32545a (patch) | |
tree | c9d42ba59facb728094a2da1fcd26bd931a2f57a | |
parent | cf4ab10d71ea03c83fad22abf70dac21bbf73e72 (diff) | |
download | gitlab-ce-f9c9daac780666dbd2ce4ad6270c66e1ee32545a.tar.gz |
Resolve static analysys. Use until instead of negative while
-rw-r--r-- | lib/gitlab/ci/trace/stream.rb | 4 |
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) |