Skip to content

Commit 71ae4ff

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-version-3
2 parents 1658f15 + 7d7478c commit 71ae4ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1276
-620
lines changed

.github/auto_request_review.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ files:
55
'doc/yjit/*': [team:yjit]
66
'bootstraptest/test_yjit*': [team:yjit]
77
'test/ruby/test_yjit*': [team:yjit]
8+
'zjit*': [team:yjit]
9+
'zjit/**/*': [team:yjit]
10+
'zjit/src/cruby_bindings.inc.rs': []
11+
'doc/zjit*': [team:yjit]
12+
'test/ruby/test_zjit*': [team:yjit]
813
options:
914
ignore_draft: true
1015
# This currently doesn't work as intended. We want to skip reviews when only

.github/workflows/check_misc.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
3030

3131
# Run this step first to make sure auto-style commits are pushed
32-
- name: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && 'Auto-correct' || 'Check for' }} code styles
32+
- name: ${{ github.ref == 'refs/heads/master' && 'Auto-correct' || 'Check for' }} code styles
3333
run: |
3434
set -x
3535
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
@@ -39,7 +39,8 @@ jobs:
3939
GIT_COMMITTER_NAME: git
4040
GITHUB_OLD_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.base.sha || github.event.before }}
4141
GITHUB_NEW_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.merge_commit_sha || github.event.after }}
42-
PUSH_REF: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && github.ref || '' }}
42+
PUSH_REF: ${{ github.ref == 'refs/heads/master' && github.ref || '' }}
43+
if: ${{ github.repository == 'ruby/ruby' }}
4344

4445
- name: Check if C-sources are US-ASCII
4546
run: |

.github/workflows/windows.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
vc: 2019
3737
vcvars: '10.0.22621.0 -vcvars_ver=14.2' # The defautl Windows 11 SDK and toolset are broken at windows-2022
3838
test_task: check
39+
- os: 2025
40+
vc: 2019
41+
vcvars: '10.0.22621.0 -vcvars_ver=14.2'
42+
test_task: check
43+
- os: 11-arm
44+
test_task: 'btest test-basic test-tool' # check and test-spec are broken yet.
45+
target: arm64
3946
- os: 2022
4047
vc: 2019
4148
vcvars: '10.0.22621.0 -vcvars_ver=14.2'
@@ -60,6 +67,7 @@ jobs:
6067
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
6168
OS_VER: windows-${{ matrix.os < 2022 && '2019' || matrix.os }}
6269
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target || 'x64' }}-windows
70+
RUBY_OPT_DIR: ${{ matrix.os == '11-arm' && 'C' || 'D' }}:/a/ruby/ruby/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
6371

6472
steps:
6573
- run: md build
@@ -70,6 +78,7 @@ jobs:
7078
ruby-version: '3.0'
7179
bundler: none
7280
windows-toolchain: none
81+
if: ${{ matrix.os != '11-arm' }}
7382

7483
- name: Install libraries with scoop
7584
run: |
@@ -106,6 +115,9 @@ jobs:
106115
for /f "delims=;" %%I in ('%vswhere% -latest -property installationPath') do (
107116
set VCVARS="%%I\VC\Auxiliary\Build\vcvars64.bat"
108117
)
118+
if "${{ matrix.os }}" == "11-arm" (
119+
set VCVARS="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
120+
)
109121
set VCVARS
110122
set | uutils sort > old.env
111123
call %VCVARS% ${{ matrix.vcvars || '' }}
@@ -139,7 +151,7 @@ jobs:
139151
- name: Configure
140152
run: >-
141153
../src/win32/configure.bat --disable-install-doc
142-
--with-opt-dir=D:/a/ruby/ruby/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
154+
--with-opt-dir=%RUBY_OPT_DIR%
143155
--with-gmp
144156
145157
- run: nmake prepare-vcpkg
@@ -152,6 +164,20 @@ jobs:
152164
# But not for this Visual Studio workflow. So here we extract gems before building.
153165
- run: nmake extract-gems
154166

167+
# windows-11-arm runner cannot run `ruby tool/file2lastrev.rb --revision.h --output=revision.h`
168+
- run: |
169+
Set-Content -Path "revision.h" -Value @"
170+
#define RUBY_REVISION "8aedb979da"
171+
#define RUBY_FULL_REVISION "8aedb979da4090116f4fc5a6497f139fd0038881"
172+
#define RUBY_BRANCH_NAME "win-arm"
173+
#define RUBY_RELEASE_DATETIME "2025-04-16T23:18:54Z"
174+
#define RUBY_RELEASE_YEAR 2025
175+
#define RUBY_RELEASE_MONTH 4
176+
#define RUBY_RELEASE_DAY 17
177+
"@
178+
shell: pwsh
179+
if: ${{ matrix.os == '11-arm' }}
180+
155181
- run: nmake
156182

157183
- name: Set up Launchable

NEWS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ The following default gems are updated.
6262
* optparse 0.7.0.dev.2
6363
* prism 1.4.0
6464
* psych 5.2.3
65-
* stringio 3.1.6
66-
* strscan 3.1.3
65+
* stringio 3.1.8.dev
66+
* strscan 3.1.4.dev
6767
* uri 1.0.3
6868

6969
The following bundled gems are added.
@@ -74,7 +74,7 @@ The following bundled gems are updated.
7474
* minitest 5.25.5
7575
* test-unit 3.6.8
7676
* rexml 3.4.1
77-
* net-imap 0.5.6
77+
* net-imap 0.5.7
7878
* net-smtp 0.5.1
7979
* rbs 3.9.2
8080
* bigdecimal 3.1.9
@@ -95,6 +95,6 @@ The following bundled gems are updated.
9595
## JIT
9696

9797
[Feature #19908]: https://bugs.ruby-lang.org/issues/19908
98-
[Feature #19908]: https://bugs.ruby-lang.org/issues/20724
98+
[Feature #20724]: https://bugs.ruby-lang.org/issues/20724
9999
[Feature #21047]: https://bugs.ruby-lang.org/issues/21047
100100
[Bug #21049]: https://bugs.ruby-lang.org/issues/21049

common.mk

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ECHO = @$(ECHO0)
1818

1919
mflags = $(MFLAGS)
2020
gnumake_recursive =
21+
sequential = $(gnumake:yes=-sequential)
2122
enable_shared = $(ENABLE_SHARED:no=)
2223

2324
UNICODE_VERSION = 16.0.0
@@ -1520,7 +1521,7 @@ refresh-gems: update-bundled_gems prepare-gems
15201521
prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
15211522
extract-gems: $(HAVE_BASERUBY:yes=update-gems)
15221523

1523-
update-gems$(gnumake:yes=-sequential): PHONY
1524+
update-gems$(sequential): PHONY
15241525
$(ECHO) Downloading bundled gem files...
15251526
$(Q) $(BASERUBY) -C "$(srcdir)" \
15261527
-I./tool -rdownloader -answ \
@@ -1534,7 +1535,7 @@ update-gems$(gnumake:yes=-sequential): PHONY
15341535
-e 'FileUtils.rm_rf(old.map{'"|n|"'n.chomp(".gem")})' \
15351536
gems/bundled_gems
15361537

1537-
extract-gems$(gnumake:yes=-sequential): PHONY
1538+
extract-gems$(sequential): PHONY
15381539
$(ECHO) Extracting bundled gem files...
15391540
$(Q) $(BASERUBY) -C "$(srcdir)" \
15401541
-Itool/lib -rfileutils -rbundled_gem -answ \
@@ -1550,7 +1551,7 @@ extract-gems$(gnumake:yes=-sequential): PHONY
15501551
-e 'end' \
15511552
gems/bundled_gems
15521553

1553-
extract-gems$(gnumake:yes=-sequential): $(HAVE_GIT:yes=clone-bundled-gems-src)
1554+
extract-gems$(sequential): $(HAVE_GIT:yes=clone-bundled-gems-src)
15541555

15551556
clone-bundled-gems-src: PHONY
15561557
$(Q) $(BASERUBY) -C "$(srcdir)" \
@@ -1723,7 +1724,7 @@ UNICODE_FILES = $(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
17231724
$(UNICODE_SRC_DATA_DIR)/SpecialCasing.txt \
17241725
$(empty)
17251726

1726-
UNICODE_PROPERTY_FILES = \
1727+
UNICODE_PROPERTY_FILES = \
17271728
$(UNICODE_SRC_DATA_DIR)/Blocks.txt \
17281729
$(UNICODE_SRC_DATA_DIR)/DerivedAge.txt \
17291730
$(UNICODE_SRC_DATA_DIR)/DerivedCoreProperties.txt \
@@ -1733,7 +1734,7 @@ UNICODE_PROPERTY_FILES = \
17331734
$(UNICODE_SRC_DATA_DIR)/Scripts.txt \
17341735
$(empty)
17351736

1736-
UNICODE_AUXILIARY_FILES = \
1737+
UNICODE_AUXILIARY_FILES = \
17371738
$(UNICODE_SRC_DATA_DIR)/auxiliary/GraphemeBreakProperty.txt \
17381739
$(UNICODE_SRC_DATA_DIR)/auxiliary/GraphemeBreakTest.txt \
17391740
$(empty)
@@ -1776,30 +1777,46 @@ UNICODE_EMOJI_DOWNLOAD = \
17761777
-d $(UNICODE_SRC_EMOJI_DATA_DIR) \
17771778
-p emoji/$(UNICODE_EMOJI_VERSION)
17781779

1779-
update-unicode-files: $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
1780-
$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES):
1780+
update-unicode-files:
17811781
$(ECHO) Downloading Unicode $(UNICODE_VERSION) data and property files...
17821782
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)"
17831783
$(Q) $(UNICODE_DOWNLOAD) $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
17841784

1785-
update-unicode-auxiliary-files: $(UNICODE_AUXILIARY_FILES)
1786-
$(UNICODE_AUXILIARY_FILES):
1785+
update-unicode-auxiliary-files:
17871786
$(ECHO) Downloading Unicode $(UNICODE_VERSION) auxiliary files...
17881787
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/auxiliary"
17891788
$(Q) $(UNICODE_AUXILIARY_DOWNLOAD) $(UNICODE_AUXILIARY_FILES)
17901789

1791-
update-unicode-ucd-emoji-files: $(UNICODE_UCD_EMOJI_FILES)
1792-
$(UNICODE_UCD_EMOJI_FILES):
1790+
update-unicode-ucd-emoji-files:
17931791
$(ECHO) Downloading Unicode UCD emoji $(UNICODE_EMOJI_VERSION) files...
17941792
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/emoji"
17951793
$(Q) $(UNICODE_UCD_EMOJI_DOWNLOAD) $(UNICODE_UCD_EMOJI_FILES)
17961794

1797-
update-unicode-emoji-files: $(UNICODE_EMOJI_FILES)
1798-
$(UNICODE_EMOJI_FILES):
1795+
update-unicode-emoji-files:
17991796
$(ECHO) Downloading Unicode emoji $(UNICODE_EMOJI_VERSION) files...
18001797
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_EMOJI_DATA_DIR)"
18011798
$(Q) $(UNICODE_EMOJI_DOWNLOAD) $(UNICODE_EMOJI_FILES)
18021799

1800+
$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES):
1801+
$(ECHO) Downloading Unicode $(UNICODE_VERSION) data and property files...
1802+
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)"
1803+
$(Q) $(UNICODE_DOWNLOAD) $@
1804+
1805+
$(UNICODE_AUXILIARY_FILES):
1806+
$(ECHO) Downloading Unicode $(UNICODE_VERSION) auxiliary files...
1807+
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/auxiliary"
1808+
$(Q) $(UNICODE_AUXILIARY_DOWNLOAD) $@
1809+
1810+
$(UNICODE_UCD_EMOJI_FILES):
1811+
$(ECHO) Downloading Unicode UCD emoji $(UNICODE_EMOJI_VERSION) files...
1812+
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/emoji"
1813+
$(Q) $(UNICODE_UCD_EMOJI_DOWNLOAD) $@
1814+
1815+
$(UNICODE_EMOJI_FILES):
1816+
$(ECHO) Downloading Unicode emoji $(UNICODE_EMOJI_VERSION) files...
1817+
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_EMOJI_DATA_DIR)"
1818+
$(Q) $(UNICODE_EMOJI_DOWNLOAD) $@
1819+
18031820
$(srcdir)/lib/unicode_normalize/tables.rb: \
18041821
$(UNICODE_SRC_DATA_DIR)/$(HAVE_BASERUBY:yes=.unicode-tables.time)
18051822

complex.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ complex_pow_for_special_angle(VALUE self, VALUE other)
10651065
else if (f_eqeq_p(dat->real, f_negate(dat->imag))) {
10661066
x = dat->imag;
10671067
dir = 3;
1068-
} else {
1068+
}
1069+
else {
10691070
dir = 0;
10701071
}
10711072

doc/string/split.rdoc

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@ When +field_sep+ is <tt>$;</tt>:
1515
When +field_sep+ is <tt>' '</tt> and +limit+ is +0+ (its default value),
1616
the split occurs at each sequence of whitespace:
1717

18-
'abc def ghi'.split(' ') => ["abc", "def", "ghi"]
18+
'abc def ghi'.split(' ') # => ["abc", "def", "ghi"]
1919
"abc \n\tdef\t\n ghi".split(' ') # => ["abc", "def", "ghi"]
20-
'abc def ghi'.split(' ') => ["abc", "def", "ghi"]
21-
''.split(' ') => []
20+
'abc def ghi'.split(' ') # => ["abc", "def", "ghi"]
21+
''.split(' ') # => []
2222

2323
When +field_sep+ is a string different from <tt>' '</tt>
2424
and +limit+ is +0+,
2525
the split occurs at each occurrence of +field_sep+;
2626
trailing empty substrings are not returned:
2727

28-
'abracadabra'.split('ab') => ["", "racad", "ra"]
29-
'aaabcdaaa'.split('a') => ["", "", "", "bcd"]
30-
''.split('a') => []
31-
'3.14159'.split('1') => ["3.", "4", "59"]
28+
'abracadabra'.split('ab') # => ["", "racad", "ra"]
29+
'aaabcdaaa'.split('a') # => ["", "", "", "bcd"]
30+
''.split('a') # => []
31+
'3.14159'.split('1') # => ["3.", "4", "59"]
3232
'!@#$%^$&*($)_+'.split('$') # => ["!@#", "%^", "&*(", ")_+"]
33-
'тест'.split('т') => ["", "ес"]
34-
'こんにちは'.split('に') => ["こん", "ちは"]
33+
'тест'.split('т') # => ["", "ес"]
34+
'こんにちは'.split('に') # => ["こん", "ちは"]
3535

3636
When +field_sep+ is a Regexp and +limit+ is +0+,
3737
the split occurs at each occurrence of a match;
3838
trailing empty substrings are not returned:
3939

4040
'abracadabra'.split(/ab/) # => ["", "racad", "ra"]
41-
'aaabcdaaa'.split(/a/) => ["", "", "", "bcd"]
42-
'aaabcdaaa'.split(//) => ["a", "a", "a", "b", "c", "d", "a", "a", "a"]
41+
'aaabcdaaa'.split(/a/) # => ["", "", "", "bcd"]
42+
'aaabcdaaa'.split(//) # => ["a", "a", "a", "b", "c", "d", "a", "a", "a"]
4343
'1 + 1 == 2'.split(/\W+/) # => ["1", "1", "2"]
4444

4545
If the \Regexp contains groups, their matches are also included
@@ -50,7 +50,7 @@ in the returned array:
5050
As seen above, if +limit+ is +0+,
5151
trailing empty substrings are not returned:
5252

53-
'aaabcdaaa'.split('a') => ["", "", "", "bcd"]
53+
'aaabcdaaa'.split('a') # => ["", "", "", "bcd"]
5454

5555
If +limit+ is positive integer +n+, no more than <tt>n - 1-</tt>
5656
splits occur, so that at most +n+ substrings are returned,
@@ -71,7 +71,7 @@ and trailing empty substrings are included:
7171

7272
'aaabcdaaa'.split('a', -1) # => ["", "", "", "bcd", "", "", ""]
7373

74-
If a block is given, it is called with each substring:
74+
If a block is given, it is called with each substring and returns +self+:
7575

7676
'abc def ghi'.split(' ') {|substring| p substring }
7777

@@ -80,5 +80,20 @@ Output:
8080
"abc"
8181
"def"
8282
"ghi"
83+
=> "abc def ghi"
84+
85+
Note that the above example is functionally the same as calling +#each+ after
86+
+#split+ and giving the same block. However, the above example has better
87+
performance because it avoids the creation of an intermediate array. Also,
88+
note the different return values.
89+
90+
'abc def ghi'.split(' ').each {|substring| p substring }
91+
92+
Output:
93+
94+
"abc"
95+
"def"
96+
"ghi"
97+
=> ["abc", "def", "ghi"]
8398

8499
Related: String#partition, String#rpartition.

doc/zjit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
To build ZJIT on macOS:
66
```
77
./autogen.sh
8-
./configure --enable-zjit=dev --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml)"
8+
./configure --enable-zjit=dev --prefix=$HOME/.rubies/ruby-zjit --disable-install-doc --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml)"
99
make -j miniruby
1010
```
1111

enc/unicode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,6 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
801801
return (int )(to - to_start);
802802
}
803803

804-
#if 0
805804
const char onigenc_unicode_version_string[] =
806805
#ifdef ONIG_UNICODE_VERSION_STRING
807806
ONIG_UNICODE_VERSION_STRING
@@ -817,4 +816,3 @@ const int onigenc_unicode_version_number[3] = {
817816
0
818817
#endif
819818
};
820-
#endif

encoding.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,17 @@ Init_Encoding(void)
19551955
rb_marshal_define_compat(rb_cEncoding, Qnil, 0, enc_m_loader);
19561956
}
19571957

1958+
void
1959+
Init_unicode_version(void)
1960+
{
1961+
extern const char onigenc_unicode_version_string[];
1962+
1963+
VALUE str = rb_usascii_str_new_static(onigenc_unicode_version_string,
1964+
strlen(onigenc_unicode_version_string));
1965+
OBJ_FREEZE(str);
1966+
rb_define_const(rb_cEncoding, "UNICODE_VERSION", str);
1967+
}
1968+
19581969
void
19591970
Init_encodings(void)
19601971
{

0 commit comments

Comments
 (0)