We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f03be8a commit 8629d6fCopy full SHA for 8629d6f
lib/simplecov/source_file.rb
@@ -218,11 +218,7 @@ def ensure_remove_undefs(file_lines)
218
# also setting these option on `file.set_encoding` doesn't seem to work
219
# properly so it has to be done here.
220
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
+ line.encode!("UTF-8", invalid: :replace, undef: :replace) unless line.encoding == Encoding::UTF_8
226
end
227
228
0 commit comments