Skip to content

Commit 8629d6f

Browse files
committed
👮 Lint/Void: Variable line used in void context.
1 parent f03be8a commit 8629d6f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/simplecov/source_file.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,7 @@ def ensure_remove_undefs(file_lines)
218218
# also setting these option on `file.set_encoding` doesn't seem to work
219219
# properly so it has to be done here.
220220
file_lines.each do |line|
221-
if line.encoding == Encoding::UTF_8
222-
line
223-
else
224-
line.encode!("UTF-8", invalid: :replace, undef: :replace)
225-
end
221+
line.encode!("UTF-8", invalid: :replace, undef: :replace) unless line.encoding == Encoding::UTF_8
226222
end
227223
end
228224

0 commit comments

Comments
 (0)