From e7529f5bc378b2d84558b4b1cb77514b6701601f Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Aug 2023 14:45:07 -0700 Subject: [PATCH] Delete utf8 backfill for old Ruby Idk if the replacement `require` is necessary exactly, but it's the one-to-one replacement for this lib, so let's start there for now! --- app/models/swf_asset.rb | 2 +- lib/openneo-auth/session.rb | 2 +- lib/utf8.rb | 13 ------------- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 lib/utf8.rb diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 76d47669..d3d99de9 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -1,6 +1,6 @@ require 'fileutils' require 'uri' -require 'utf8' +require 'encoding/character/utf-8' class SwfAsset < ActiveRecord::Base # We use the `type` column to mean something other than what Rails means! diff --git a/lib/openneo-auth/session.rb b/lib/openneo-auth/session.rb index 92ed53dc..ba712979 100644 --- a/lib/openneo-auth/session.rb +++ b/lib/openneo-auth/session.rb @@ -1,7 +1,7 @@ require 'active_support/core_ext/hash' require 'msgpack' require 'openneo-auth-signatory' -require 'utf8' +require 'encoding/character/utf-8' module Openneo module Auth diff --git a/lib/utf8.rb b/lib/utf8.rb deleted file mode 100644 index 15f7bffe..00000000 --- a/lib/utf8.rb +++ /dev/null @@ -1,13 +0,0 @@ -if String.method_defined?(:force_encoding) - # UTF-8 support is native, so let's route the +"abc" syntax to the native - # encode method. - - class String - def +@ - dup.force_encoding('utf-8') - end - end -else - require 'encoding/character/utf-8' -end -