Skip to content

Commit dcd46bd

Browse files
committed
Merge branch 'master' into mmtk
2 parents ae47e55 + 2114d0a commit dcd46bd

File tree

204 files changed

+3797
-2991
lines changed

Some content is hidden

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

204 files changed

+3797
-2991
lines changed

.github/actions/setup/macos/action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ runs:
1818
- name: Set ENV
1919
shell: bash
2020
run: |
21-
for lib in [email protected] gmp; do
21+
for lib in gmp; do
22+
ruby_configure_args="${ruby_configure_args:+$ruby_configure_args }--with-${lib%@*}-dir=$(brew --prefix $lib)"
23+
done
24+
for lib in [email protected]; do
2225
CONFIGURE_ARGS="${CONFIGURE_ARGS:+$CONFIGURE_ARGS }--with-${lib%@*}-dir=$(brew --prefix $lib)"
2326
done
27+
echo ruby_configure_args="${ruby_configure_args}" >> $GITHUB_ENV
2428
echo CONFIGURE_ARGS="${CONFIGURE_ARGS}" >> $GITHUB_ENV

.github/workflows/annocheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
builddir: build
7575
makeup: true
7676

77-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
77+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
7878
with:
7979
ruby-version: '3.0'
8080
bundler: none

.github/workflows/baseruby.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- ruby-3.3
5252

5353
steps:
54-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
54+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
5555
with:
5656
ruby-version: ${{ matrix.ruby }}
5757
bundler: none

.github/workflows/check_dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- uses: ./.github/actions/setup/directories
5757

58-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
58+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
5959
with:
6060
ruby-version: '3.0'
6161
bundler: none

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ jobs:
8080
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
8181

8282
- name: Initialize CodeQL
83-
uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
83+
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
8484
with:
8585
languages: ${{ matrix.language }}
8686

8787
- name: Autobuild
88-
uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
88+
uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
8989

9090
- name: Perform CodeQL Analysis
91-
uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
91+
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
9292
with:
9393
category: '/language:${{ matrix.language }}'
9494
upload: False
@@ -118,7 +118,7 @@ jobs:
118118
continue-on-error: true
119119

120120
- name: Upload SARIF
121-
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
121+
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
122122
with:
123123
sarif_file: sarif-results/${{ matrix.language }}.sarif
124124
continue-on-error: true

.github/workflows/macos.yml

+38-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@ jobs:
7070
# Set fetch-depth: 0 so that Launchable can receive commits information.
7171
fetch-depth: 10
7272

73+
- name: make sure that kern.coredump=1
74+
run: |
75+
sysctl -n kern.coredump
76+
sudo sysctl -w kern.coredump=1
77+
sudo chmod -R +rwx /cores/
78+
7379
- name: Run configure
74-
run: ../src/configure -C --disable-install-doc
80+
run: ../src/configure -C --disable-install-doc ${ruby_configure_args}
7581

7682
- run: make prepare-gems
7783
if: ${{ matrix.test_task == 'test-bundled-gems' }}
@@ -110,6 +116,7 @@ jobs:
110116

111117
- name: make skipped tests
112118
run: |
119+
ulimit -c unlimited
113120
make -s test-all TESTS="${TESTS//-n!\//-n/}"
114121
env:
115122
GNUMAKEFLAGS: ''
@@ -124,6 +131,36 @@ jobs:
124131
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
125132
if: ${{ failure() }}
126133

134+
- name: Resolve job ID
135+
id: job_id
136+
uses: actions/github-script@main
137+
env:
138+
matrix: ${{ toJson(matrix) }}
139+
with:
140+
script: |
141+
const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
142+
owner: context.repo.owner,
143+
repo: context.repo.repo,
144+
run_id: context.runId
145+
});
146+
const matrix = JSON.parse(process.env.matrix);
147+
const job_name = `${context.job}${matrix ? ` (${Object.values(matrix).join(", ")})` : ""}`;
148+
return workflow_run.jobs.find((job) => job.name === job_name).id;
149+
150+
- name: upload /cores
151+
run: |
152+
ls -l /cores
153+
CORES_TAR_GZ="cores-${{ github.run_id }}-${{ steps.job_id.outputs.result }}.tar.gz"
154+
echo "test: $CORES_TAR_GZ"
155+
if [ -n "$(ls /cores)" ]; then
156+
tar czf /cores "$CORES_TAR_GZ"
157+
aws s3 cp "$CORES_TAR_GZ" "s3://ruby-core-files/$CORES_TAR_GZ"
158+
fi
159+
env:
160+
AWS_ACCESS_KEY_ID: ${{ secrets.RUBY_CORE_FILES_AWS_ACCESS_KEY_ID }}
161+
AWS_SECRET_ACCESS_KEY: ${{ secrets.RUBY_CORE_FILES_AWS_SECRET_ACCESS_KEY }}
162+
AWS_DEFAULT_REGION: ap-northeast-1
163+
127164
result:
128165
if: ${{ always() }}
129166
name: ${{ github.workflow }} result

.github/workflows/mingw.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
6767
steps:
6868
- name: Set up Ruby & MSYS2
69-
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
69+
uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
7070
with:
7171
ruby-version: ${{ matrix.baseruby }}
7272

.github/workflows/prism.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ jobs:
9595
RUBY_TESTOPTS: '-q --tty=no --excludes-dir="../src/test/.excludes-prism" --exclude="error_highlight/test_error_highlight.rb" --exclude="prism/encoding_test.rb"'
9696
RUN_OPTS: ${{ matrix.run_opts }}
9797

98-
- name: make test-prism-spec
98+
- name: make test-spec
9999
run: |
100-
$SETARCH make -s test-prism-spec SPECOPTS="$SPECOPTS"
100+
$SETARCH make -s test-spec SPECOPTS="$SPECOPTS"
101101
timeout-minutes: 10
102102
env:
103103
GNUMAKEFLAGS: ''

.github/workflows/rjit-bindgen.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
steps:
4949
- name: Set up Ruby
50-
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
50+
uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
5151
with:
5252
ruby-version: '3.1'
5353

.github/workflows/scorecards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ jobs:
6767

6868
# Upload the results to GitHub's code scanning dashboard.
6969
- name: 'Upload to code-scanning'
70-
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v2.1.27
70+
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v2.1.27
7171
with:
7272
sarif_file: results.sarif

.github/workflows/spec_guards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
steps:
4848
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
4949

50-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
50+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
5151
with:
5252
ruby-version: ${{ matrix.ruby }}
5353
bundler: none

.github/workflows/ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
arch: ${{ matrix.arch }}
6969

70-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
70+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
7171
with:
7272
ruby-version: '3.0'
7373
bundler: none

.github/workflows/wasm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
run: |
101101
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
102102
103-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
103+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
104104
with:
105105
ruby-version: '3.0'
106106
bundler: none

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
${{ steps.find-tools.outputs.needs }}
9292
if: ${{ steps.find-tools.outputs.needs != '' }}
9393

94-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
94+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
9595
with:
9696
ruby-version: '3.0'
9797
bundler: none

.github/workflows/yjit-ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
if: ${{ matrix.rust_version }}
148148
run: rustup install ${{ matrix.rust_version }} --profile minimal
149149

150-
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
150+
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
151151
with:
152152
ruby-version: '3.0'
153153
bundler: none

NEWS.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,25 @@ The following default gems are updated.
5050
* net-http 0.4.1
5151
* optparse 0.5.0
5252
* prism 0.29.0
53-
* rdoc 6.6.3.1
53+
* rdoc 6.7.0
5454
* reline 0.5.7
5555
* resolv 0.4.0
5656
* stringio 3.1.1
5757
* strscan 3.1.1
5858

5959
The following bundled gems are updated.
6060

61-
* minitest 5.22.3
61+
* minitest 5.23.1
6262
* rake 13.2.1
6363
* test-unit 3.6.2
64+
* rexml 3.2.8
6465
* net-ftp 0.3.4
6566
* net-imap 0.4.11
6667
* net-smtp 0.5.0
6768
* rbs 3.4.4
6869
* typeprof 0.21.11
6970
* debug 1.9.2
71+
* racc 1.8.0
7072

7173
The following bundled gems are promoted from default gems.
7274

@@ -122,7 +124,7 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log
122124
a warning on verbose mode (`-w`).
123125
[[Feature #15554]]
124126

125-
* Redefining some core methods that are specially optimized by the interpeter
127+
* Redefining some core methods that are specially optimized by the interpreter
126128
and JIT like `String.freeze` or `Integer#+` now emits a performance class
127129
warning (`-W:performance` or `Warning[:performance] = true`).
128130
[[Feature #20429]]

array.c

+13
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,19 @@ rb_ary_free(VALUE ary)
10761076
}
10771077
}
10781078

1079+
VALUE
1080+
rb_setup_fake_ary(struct RArray *fake_ary, const VALUE *list, long len, bool freeze)
1081+
{
1082+
fake_ary->basic.flags = T_ARRAY;
1083+
VALUE ary = (VALUE)fake_ary;
1084+
RBASIC_CLEAR_CLASS(ary);
1085+
ARY_SET_PTR(ary, list);
1086+
ARY_SET_HEAP_LEN(ary, len);
1087+
ARY_SET_CAPA(ary, len);
1088+
if (freeze) OBJ_FREEZE(ary);
1089+
return ary;
1090+
}
1091+
10791092
size_t
10801093
rb_ary_memsize(VALUE ary)
10811094
{

common.mk

+4-11
Original file line numberDiff line numberDiff line change
@@ -1020,15 +1020,6 @@ yes-test-spec: yes-test-spec-precheck
10201020
$(ACTIONS_ENDGROUP)
10211021
no-test-spec:
10221022

1023-
test-prism-spec: $(TEST_RUNNABLE)-test-prism-spec
1024-
yes-test-prism-spec: yes-test-spec-precheck
1025-
$(ACTIONS_GROUP)
1026-
$(gnumake_recursive)$(Q) \
1027-
$(RUNRUBY) -r./$(arch)-fake -r$(tooldir)/lib/_tmpdir \
1028-
$(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec -B $(srcdir)/spec/prism.mspec $(MSPECOPT) $(SPECOPTS)
1029-
$(ACTIONS_ENDGROUP)
1030-
no-test-prism-spec:
1031-
10321023
check: $(DOT_WAIT) test-spec
10331024

10341025
RUNNABLE = $(LIBRUBY_RELATIVE:no=un)-runnable
@@ -1602,16 +1593,18 @@ yes-test-bundled-gems-prepare: yes-test-bundled-gems-precheck
16021593
$(ACTIONS_ENDGROUP)
16031594

16041595
PREPARE_BUNDLED_GEMS = test-bundled-gems-prepare
1605-
test-bundled-gems: $(TEST_RUNNABLE)-test-bundled-gems $(TEST_RUNNABLE)-test-bundled-gems-spec
1596+
test-bundled-gems: $(TEST_RUNNABLE)-test-bundled-gems $(DOT_WAIT) $(TEST_RUNNABLE)-test-bundled-gems-spec
16061597
yes-test-bundled-gems: test-bundled-gems-run
16071598
no-test-bundled-gems:
16081599

16091600
# Override this to allow failure of specific gems on CI
16101601
# TEST_BUNDLED_GEMS_ALLOW_FAILURES =
16111602

16121603
BUNDLED_GEMS =
1613-
test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
1604+
test-bundled-gems-run: $(TEST_RUNNABLE)-test-bundled-gems-run
1605+
yes-test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
16141606
$(gnumake_recursive)$(Q) $(XRUBY) $(tooldir)/test-bundled-gems.rb $(BUNDLED_GEMS)
1607+
no-test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
16151608

16161609
test-bundled-gems-spec: $(TEST_RUNNABLE)-test-bundled-gems-spec
16171610
yes-test-bundled-gems-spec: yes-test-spec-precheck $(PREPARE_BUNDLED_GEMS)

0 commit comments

Comments
 (0)