Sha256: 654b9bea8086cbcbbdb915affba2a459218012314e8af1015809b633dfb7a37c

Contents?: true

Size: 167 Bytes

Versions: 25

Compression:

Stored size: 167 Bytes

Contents

module Ahoy
  module Utils
    def self.ensure_utf8(str)
      str.encode("UTF-8", "binary", invalid: :replace, undef: :replace, replace: "") if str
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ahoy_matey-5.3.0 lib/ahoy/utils.rb
ahoy_matey-5.2.1 lib/ahoy/utils.rb
ahoy_matey-5.2.0 lib/ahoy/utils.rb
ahoy_matey-5.1.0 lib/ahoy/utils.rb
ahoy_matey-5.0.2 lib/ahoy/utils.rb
ahoy_matey-5.0.1 lib/ahoy/utils.rb
ahoy_matey-5.0.0 lib/ahoy/utils.rb
ahoy_matey-4.2.1 lib/ahoy/utils.rb
ahoy_matey-4.2.0 lib/ahoy/utils.rb
ahoy_matey-4.1.0 lib/ahoy/utils.rb
ahoy_matey-4.0.3 lib/ahoy/utils.rb
ahoy_matey-4.0.2 lib/ahoy/utils.rb
ahoy_matey-4.0.1 lib/ahoy/utils.rb
ahoy_matey-4.0.0 lib/ahoy/utils.rb
ahoy_matey-3.3.0 lib/ahoy/utils.rb
ahoy_matey-3.2.0 lib/ahoy/utils.rb
ahoy_matey-3.1.0 lib/ahoy/utils.rb
ahoy_matey-3.0.5 lib/ahoy/utils.rb
ahoy_matey-3.0.4 lib/ahoy/utils.rb
ahoy_matey-3.0.3 lib/ahoy/utils.rb