Skip to content

Commit 83147b8

Browse files
committed
Remove unnecessary assignment for string encoding
1 parent 027e88b commit 83147b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/overcommit/hook_context/pre_commit.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def amendment?
1919
# containing unicode characters, we replace the offending characters,
2020
# since the pattern we're looking for will consist of ASCII characters
2121
unless cmd.valid_encoding?
22-
cmd = cmd.encode('UTF-16be', invalid: :replace, replace: '?').encode('UTF-8')
22+
cmd.encode!('UTF-16be', invalid: :replace, replace: '?').encode!('UTF-8')
2323
end
2424

2525
return @amendment if

0 commit comments

Comments
 (0)