class Mercurial::ChangedFile

Private Instance Methods

enforce_unicode(str) click to toggle source
# File lib/core_ext/mercurial-ruby/changed_file.rb, line 7
def enforce_unicode(str)
  # String#encode patched to be Ruby 3.0+ compatible
  str.encode('utf-8', invalid: :replace, undef: :replace, replace: '?')
end