[Feature #19908] Update Unicode headers to 15.1.0
This commit is contained in:
parent
4f82a6f3e8
commit
e63c516046
Notes:
git
2025-03-18 12:18:35 +00:00
6
NEWS.md
6
NEWS.md
@ -17,6 +17,11 @@ Note: We're only listing outstanding class updates.
|
||||
Also, `Binding#local_variable_get` and `Binding#local_variable_set` reject to handle numbered parameters.
|
||||
[[Bug #21049]]
|
||||
|
||||
* String
|
||||
|
||||
* Update Unicode to Version 15.1.0 and Emoji Version 15.1. [[Feature #19908]]
|
||||
(also applies to Regexp)
|
||||
|
||||
## Stdlib updates
|
||||
|
||||
The following bundled gems are promoted from default gems.
|
||||
@ -78,4 +83,5 @@ The following bundled gems are updated.
|
||||
|
||||
## JIT
|
||||
|
||||
[Feature #19908]: https://bugs.ruby-lang.org/issues/19908
|
||||
[Bug #21049]: https://bugs.ruby-lang.org/issues/21049
|
||||
|
@ -20,7 +20,7 @@ mflags = $(MFLAGS)
|
||||
gnumake_recursive =
|
||||
enable_shared = $(ENABLE_SHARED:no=)
|
||||
|
||||
UNICODE_VERSION = 15.0.0
|
||||
UNICODE_VERSION = 15.1.0
|
||||
UNICODE_EMOJI_VERSION_0 = $(UNICODE_VERSION)///
|
||||
UNICODE_EMOJI_VERSION_1 = $(UNICODE_EMOJI_VERSION_0:.0///=)
|
||||
UNICODE_EMOJI_VERSION = $(UNICODE_EMOJI_VERSION_1:///=)
|
||||
|
@ -79,6 +79,9 @@ Older versions may not support all of these.
|
||||
- <tt>\p{Hyphen}</tt>
|
||||
- <tt>\p{IDS_Binary_Operator}</tt>, <tt>\p{IDSB}</tt>
|
||||
- <tt>\p{IDS_Trinary_Operator}</tt>, <tt>\p{IDST}</tt>
|
||||
- <tt>\p{IDS_Unary_Operator}</tt>, <tt>\p{IDSU}</tt>
|
||||
- <tt>\p{ID_Compat_Math_Continue}</tt>
|
||||
- <tt>\p{ID_Compat_Math_Start}</tt>
|
||||
- <tt>\p{Ideographic}</tt>, <tt>\p{Ideo}</tt>
|
||||
- <tt>\p{Join_Control}</tt>, <tt>\p{Join_C}</tt>
|
||||
- <tt>\p{Logical_Order_Exception}</tt>, <tt>\p{LOE}</tt>
|
||||
@ -120,6 +123,9 @@ Older versions may not support all of these.
|
||||
- <tt>\p{Grapheme_Link}</tt>, <tt>\p{Gr_Link}</tt>
|
||||
- <tt>\p{ID_Continue}</tt>, <tt>\p{IDC}</tt>
|
||||
- <tt>\p{ID_Start}</tt>, <tt>\p{IDS}</tt>
|
||||
- <tt>\p{InCB_Consonant}</tt>
|
||||
- <tt>\p{InCB_Extend}</tt>
|
||||
- <tt>\p{InCB_Linker}</tt>
|
||||
- <tt>\p{Lowercase}</tt>, <tt>\p{Lower}</tt>
|
||||
- <tt>\p{Math}</tt>
|
||||
- <tt>\p{Uppercase}</tt>, <tt>\p{Upper}</tt>
|
||||
@ -348,6 +354,7 @@ Older versions may not support all of these.
|
||||
- <tt>\p{In_CJK_Unified_Ideographs_Extension_F}</tt>
|
||||
- <tt>\p{In_CJK_Unified_Ideographs_Extension_G}</tt>
|
||||
- <tt>\p{In_CJK_Unified_Ideographs_Extension_H}</tt>
|
||||
- <tt>\p{In_CJK_Unified_Ideographs_Extension_I}</tt>
|
||||
- <tt>\p{In_Carian}</tt>
|
||||
- <tt>\p{In_Caucasian_Albanian}</tt>
|
||||
- <tt>\p{In_Chakma}</tt>
|
||||
@ -658,6 +665,7 @@ Older versions may not support all of these.
|
||||
- <tt>\p{Age_13_0}</tt>
|
||||
- <tt>\p{Age_14_0}</tt>
|
||||
- <tt>\p{Age_15_0}</tt>
|
||||
- <tt>\p{Age_15_1}</tt>
|
||||
- <tt>\p{Age_1_1}</tt>
|
||||
- <tt>\p{Age_2_0}</tt>
|
||||
- <tt>\p{Age_2_1}</tt>
|
||||
|
@ -3,14 +3,14 @@
|
||||
|
||||
#if defined ONIG_UNICODE_VERSION_STRING && !( \
|
||||
ONIG_UNICODE_VERSION_MAJOR == 15 && \
|
||||
ONIG_UNICODE_VERSION_MINOR == 0 && \
|
||||
ONIG_UNICODE_VERSION_MINOR == 1 && \
|
||||
ONIG_UNICODE_VERSION_TEENY == 0 && \
|
||||
1)
|
||||
# error ONIG_UNICODE_VERSION_STRING mismatch
|
||||
#endif
|
||||
#define ONIG_UNICODE_VERSION_STRING "15.0.0"
|
||||
#define ONIG_UNICODE_VERSION_STRING "15.1.0"
|
||||
#define ONIG_UNICODE_VERSION_MAJOR 15
|
||||
#define ONIG_UNICODE_VERSION_MINOR 0
|
||||
#define ONIG_UNICODE_VERSION_MINOR 1
|
||||
#define ONIG_UNICODE_VERSION_TEENY 0
|
||||
|
||||
static const CaseFold_11_Type CaseFold_11_Table[] = {
|
File diff suppressed because it is too large
Load Diff
@ -14,10 +14,16 @@ describe "RbConfig::CONFIG['UNICODE_EMOJI_VERSION']" do
|
||||
end
|
||||
end
|
||||
|
||||
# Caution: ruby_version_is means is_or_later
|
||||
ruby_version_is "3.2" do
|
||||
ruby_version_is "3.2"..."3.4" do
|
||||
it "is 15.0" do
|
||||
RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "15.0"
|
||||
end
|
||||
end
|
||||
|
||||
# Caution: ruby_version_is means is_or_later
|
||||
ruby_version_is "3.5" do
|
||||
it "is 15.1" do
|
||||
RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "15.1"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -14,10 +14,16 @@ describe "RbConfig::CONFIG['UNICODE_VERSION']" do
|
||||
end
|
||||
end
|
||||
|
||||
# Caution: ruby_version_is means is_or_later
|
||||
ruby_version_is "3.2" do
|
||||
ruby_version_is "3.2"..."3.4" do
|
||||
it "is 15.0.0" do
|
||||
RbConfig::CONFIG['UNICODE_VERSION'].should == "15.0.0"
|
||||
end
|
||||
end
|
||||
|
||||
# Caution: ruby_version_is means is_or_later
|
||||
ruby_version_is "3.5" do
|
||||
it "is 15.1.0" do
|
||||
RbConfig::CONFIG['UNICODE_VERSION'].should == "15.1.0"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1511,6 +1511,19 @@ class TestRegexp < Test::Unit::TestCase
|
||||
"CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF")
|
||||
end
|
||||
|
||||
def test_unicode_age_15_1
|
||||
@matches = %w"15.1"
|
||||
@unmatches = %w"15.0"
|
||||
|
||||
# https://www.unicode.org/Public/15.1.0/ucd/DerivedAge.txt
|
||||
assert_unicode_age("\u{2FFC}".."\u{2FFF}",
|
||||
"IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ROTATION")
|
||||
assert_unicode_age("\u{31EF}",
|
||||
"IDEOGRAPHIC DESCRIPTION CHARACTER SUBTRACTION")
|
||||
assert_unicode_age("\u{2EBF0}".."\u{2EE5D}",
|
||||
"CJK UNIFIED IDEOGRAPH-2EBF0..CJK UNIFIED IDEOGRAPH-2EE5D")
|
||||
end
|
||||
|
||||
UnicodeAgeRegexps = Hash.new do |h, age|
|
||||
h[age] = [/\A\p{age=#{age}}+\z/u, /\A\P{age=#{age}}+\z/u].freeze
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user