Skip to content

Commit

Permalink
style: rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 10, 2022
1 parent 2547450 commit 8ed8224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact_broker/api/contracts/utf_8_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Api
module Contracts
module UTF8Validation
def fragment_before_invalid_utf_8_char(string)
string.force_encoding('UTF-8').each_char.with_index do | char, index |
string.force_encoding("UTF-8").each_char.with_index do | char, index |
if !char.valid_encoding?
fragment = index < 100 ? string[0...index] : string[index-100...index]
return index + 1, fragment
Expand Down

0 comments on commit 8ed8224

Please sign in to comment.