[Feature #19908] Update Unicode headers to 15.1.0

This commit is contained in:
Mari Imaizumi 2025-02-24 12:01:14 +09:00
parent 4f82a6f3e8
commit e63c516046
Notes: git 2025-03-18 12:18:35 +00:00
8 changed files with 4169 additions and 3106 deletions

View File

@ -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

View File

@ -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:///=)

View File

@ -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>

View File

@ -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[] = {

View File

@ -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

View File

@ -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

View File

@ -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