Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a1638748
Commit
a1638748
authored
May 22, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put force_encoding in def reverse_line
parent
22f1d2a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/ci/trace/stream.rb
lib/gitlab/ci/trace/stream.rb
+3
-3
No files found.
lib/gitlab/ci/trace/stream.rb
View file @
a1638748
...
@@ -74,7 +74,7 @@ module Gitlab
...
@@ -74,7 +74,7 @@ module Gitlab
match
=
""
match
=
""
reverse_line
do
|
line
|
reverse_line
do
|
line
|
matches
=
line
.
force_encoding
(
regex
.
encoding
).
scan
(
regex
)
matches
=
line
.
scan
(
regex
)
next
unless
matches
.
is_a?
(
Array
)
next
unless
matches
.
is_a?
(
Array
)
next
if
matches
.
empty?
next
if
matches
.
empty?
...
@@ -108,11 +108,11 @@ module Gitlab
...
@@ -108,11 +108,11 @@ module Gitlab
buf
=
stream
.
read
(
read_size
)
+
debris
buf
=
stream
.
read
(
read_size
)
+
debris
debris
,
*
lines
=
buf
.
each_line
.
to_a
debris
,
*
lines
=
buf
.
each_line
.
to_a
lines
.
reverse_each
do
|
line
|
lines
.
reverse_each
do
|
line
|
yield
(
line
)
yield
(
line
.
force_encoding
(
'UTF-8'
)
)
end
end
end
end
yield
(
debris
)
yield
(
debris
.
force_encoding
(
'UTF-8'
)
)
end
end
def
calc_read_size
(
pos
,
max
)
def
calc_read_size
(
pos
,
max
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment