Deprecate `ActiveSupport::Multibyte::Unicode.default_normalization_form`
This commit is contained in:
parent
2c6f5c0b8a
commit
6cbc7842f0
|
@ -1,3 +1,7 @@
|
|||
* Deprecate `ActiveSupport::Multibyte::Unicode.default_normalization_form`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove deprecated `ActiveSupport::Multibyte::Unicode.pack_graphemes`,
|
||||
`ActiveSupport::Multibyte::Unicode.unpack_graphemes`,
|
||||
`ActiveSupport::Multibyte::Unicode.normalize`,
|
||||
|
|
|
@ -5,20 +5,20 @@ module ActiveSupport
|
|||
module Unicode
|
||||
extend self
|
||||
|
||||
# A list of all available normalization forms.
|
||||
# See https://www.unicode.org/reports/tr15/tr15-29.html for more
|
||||
# information about normalization.
|
||||
NORMALIZATION_FORMS = [:c, :kc, :d, :kd]
|
||||
|
||||
# The Unicode version that is supported by the implementation
|
||||
UNICODE_VERSION = RbConfig::CONFIG["UNICODE_VERSION"]
|
||||
|
||||
# The default normalization used for operations that require
|
||||
# normalization. It can be set to any of the normalizations
|
||||
# in NORMALIZATION_FORMS.
|
||||
#
|
||||
# ActiveSupport::Multibyte::Unicode.default_normalization_form = :c
|
||||
attr_accessor :default_normalization_form # TODO: Deprecate
|
||||
def default_normalization_form
|
||||
ActiveSupport::Deprecation.warn(
|
||||
"ActiveSupport::Multibyte::Unicode.default_normalization_form is deprecated and will be removed in Rails 6.1"
|
||||
)
|
||||
end
|
||||
|
||||
def default_normalization_form=(_)
|
||||
ActiveSupport::Deprecation.warn(
|
||||
"ActiveSupport::Multibyte::Unicode.default_normalization_form= is deprecated and will be removed in Rails 6.1"
|
||||
)
|
||||
end
|
||||
|
||||
# Decompose composed characters to the decomposed form.
|
||||
def decompose(type, codepoints)
|
||||
|
|
|
@ -314,6 +314,8 @@ Please refer to the [Changelog][active-support] for detailed changes.
|
|||
|
||||
### Deprecations
|
||||
|
||||
* Deprecate `ActiveSupport::Multibyte::Unicode.default_normalization_form`.
|
||||
|
||||
### Notable changes
|
||||
|
||||
Active Job
|
||||
|
|
Loading…
Reference in New Issue