Skip to content

Commit e37fb27

Browse files
committed
Merge branch 'master' into mmtk
2 parents 16b93e4 + d827d32 commit e37fb27

File tree

299 files changed

+8261
-5195
lines changed

Some content is hidden

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

299 files changed

+8261
-5195
lines changed

.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
77+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
54+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
58+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
83+
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
8484
with:
8585
languages: ${{ matrix.language }}
8686

8787
- name: Autobuild
88-
uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
88+
uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
8989

9090
- name: Perform CodeQL Analysis
91-
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
91+
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
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@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
121+
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
122122
with:
123123
sarif_file: sarif-results/${{ matrix.language }}.sarif
124124
continue-on-error: true

.github/workflows/macos.yml

+1-15
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107

108108
- name: make ${{ matrix.test_task }}
109109
run: |
110+
ulimit -c unlimited
110111
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
111112
timeout-minutes: 60
112113
env:
@@ -116,7 +117,6 @@ jobs:
116117

117118
- name: make skipped tests
118119
run: |
119-
ulimit -c unlimited
120120
make -s test-all TESTS="${TESTS//-n!\//-n/}"
121121
env:
122122
GNUMAKEFLAGS: ''
@@ -147,20 +147,6 @@ jobs:
147147
const job_name = `${context.job}${matrix ? ` (${Object.values(matrix).join(", ")})` : ""}`;
148148
return workflow_run.jobs.find((job) => job.name === job_name).id;
149149
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-
164150
result:
165151
if: ${{ always() }}
166152
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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
69+
uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
7070
with:
7171
ruby-version: ${{ matrix.baseruby }}
7272

.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
50+
uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@f079b8493333aace61c81488f8bd40919487bd9f # v2.1.27
70+
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
50+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
70+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
103+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
104104
with:
105105
ruby-version: '3.0'
106106
bundler: none

.github/workflows/windows.yml

+2-2
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@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
94+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
9595
with:
9696
ruby-version: '3.0'
9797
bundler: none
@@ -115,7 +115,7 @@ jobs:
115115
116116
- name: Install libraries with vcpkg
117117
run: |
118-
vcpkg --triplet x64-windows install libffi libyaml openssl readline zlib
118+
vcpkg --triplet x64-windows install gmp libffi libyaml openssl zlib
119119
120120
- name: Install libraries with scoop
121121
run: |

.github/workflows/yjit-ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134

135135
- uses: ./.github/actions/setup/ubuntu
136136

137-
- uses: ruby/setup-ruby@0cde4689ba33c09f1b890c1725572ad96751a3fc # v1.178.0
137+
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
138138
with:
139139
ruby-version: '3.0'
140140
bundler: none

.rdoc_options

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ encoding: UTF-8
55
main_page: README.md
66
title: Documentation for Ruby development version
77
visibility: :private
8+
rdoc_include:
9+
- doc

LEGAL

-18
Original file line numberDiff line numberDiff line change
@@ -727,24 +727,6 @@ mentioned below.
727727
for internal or external distribution as long as this notice
728728
remains attached.
729729

730-
[ext/nkf/nkf-utf8/config.h]
731-
[ext/nkf/nkf-utf8/nkf.c]
732-
[ext/nkf/nkf-utf8/utf8tbl.c]
733-
734-
These files are under the following license. So to speak, it is
735-
copyrighted semi-public-domain software.
736-
737-
>>>
738-
Copyright (C) 1987:: Fujitsu LTD. (Itaru ICHIKAWA)
739-
740-
Everyone is permitted to do anything on this program
741-
including copying, modifying, improving,
742-
as long as you don't try to pretend that you wrote it.
743-
i.e., the above copyright notice has to appear in all copies.
744-
Binary distribution requires original version messages.
745-
You don't have to ask before copying, redistribution or publishing.
746-
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
747-
748730
[ext/psych]
749731
[test/psych]
750732

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The following default gems are updated.
5858
* json 2.7.2
5959
* net-http 0.4.1
6060
* optparse 0.5.0
61-
* prism 0.29.0
61+
* prism 0.30.0
6262
* rdoc 6.7.0
6363
* reline 0.5.8
6464
* resolv 0.4.0

README.ja.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![Actions Status: Windows](https://github.com/ruby/ruby/workflows/Windows/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Windows")
55
[![AppVeyor status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
66
[![Travis Status](https://app.travis-ci.com/ruby/ruby.svg?branch=master)](https://app.travis-ci.com/ruby/ruby)
7-
[![Cirrus Status](https://api.cirrus-ci.com/github/ruby/ruby.svg)](https://cirrus-ci.com/github/ruby/ruby/master)
87

98
# Rubyとは
109

bignum.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
# define USE_GMP 0
3131
#endif
3232
#endif
33-
#if USE_GMP
34-
# include <gmp.h>
35-
#endif
3633

3734
#include "id.h"
3835
#include "internal.h"
@@ -48,6 +45,15 @@
4845
#include "ruby/util.h"
4946
#include "ruby_assert.h"
5047

48+
#if USE_GMP
49+
RBIMPL_WARNING_PUSH()
50+
# ifdef _MSC_VER
51+
RBIMPL_WARNING_IGNORED(4146) /* for mpn_neg() */
52+
# endif
53+
# include <gmp.h>
54+
RBIMPL_WARNING_POP()
55+
#endif
56+
5157
static const bool debug_integer_pack = (
5258
#ifdef DEBUG_INTEGER_PACK
5359
DEBUG_INTEGER_PACK+0

bootstraptest/runner.rb

+11-7
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ def main
163163
BT.quiet = false
164164
BT.timeout = 180
165165
BT.timeout_scale = (defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? ? 3 : 1) # for --jit-wait
166+
if (ts = (ENV["RUBY_TEST_TIMEOUT_SCALE"] || ENV["RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE"]).to_i) > 1
167+
BT.timeout_scale *= ts
168+
end
169+
166170
# BT.wn = 1
167171
dir = nil
168172
quiet = false
@@ -234,7 +238,7 @@ def main
234238
end
235239
tests ||= ARGV
236240
tests = Dir.glob("#{File.dirname($0)}/test_*.rb").sort if tests.empty?
237-
pathes = tests.map {|path| File.expand_path(path) }
241+
paths = tests.map {|path| File.expand_path(path) }
238242

239243
BT.progress = %w[- \\ | /]
240244
BT.progress_bs = "\b" * BT.progress[0].size
@@ -278,7 +282,7 @@ def main
278282
end
279283

280284
in_temporary_working_directory(dir) do
281-
exec_test pathes
285+
exec_test paths
282286
end
283287
end
284288

@@ -290,8 +294,8 @@ def erase(e = true)
290294
end
291295
end
292296

293-
def load_test pathes
294-
pathes.each do |path|
297+
def load_test paths
298+
paths.each do |path|
295299
load File.expand_path(path)
296300
end
297301
end
@@ -341,13 +345,13 @@ def concurrent_exec_test
341345
end
342346
end
343347

344-
def exec_test(pathes)
348+
def exec_test(paths)
345349
# setup
346-
load_test pathes
350+
load_test paths
347351
BT_STATE.count = 0
348352
BT_STATE.error = 0
349353
BT.columns = 0
350-
BT.width = pathes.map {|path| File.basename(path).size}.max + 2
354+
BT.width = paths.map {|path| File.basename(path).size}.max + 2
351355

352356
# execute tests
353357
if BT.wn > 1

bootstraptest/test_syntax.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ class X < RuntimeError;end
848848
def x(a=1, b, *rest); nil end
849849
end
850850
end
851-
}, bug2415
851+
}, bug2415 unless rjit_enabled? # flaky
852852

853853
assert_normal_exit %q{
854854
0.times do
@@ -880,7 +880,7 @@ def x@; nil; end
880880
end
881881
end
882882
end
883-
}, bug2415
883+
}, bug2415 unless rjit_enabled? # flaky
884884

885885
assert_normal_exit %q{
886886
a {

bootstraptest/test_yjit.rb

+64
Original file line numberDiff line numberDiff line change
@@ -4815,6 +4815,15 @@ def tests
48154815
tests
48164816
}
48174817

4818+
# test integer left shift fusion followed by opt_getconstant_path
4819+
assert_equal '33', %q{
4820+
def test(a)
4821+
(a << 5) | (Object; a)
4822+
end
4823+
4824+
test(1)
4825+
}
4826+
48184827
# test String#stebyte with arguments that need conversion
48194828
assert_equal "abc", %q{
48204829
str = +"a00"
@@ -4994,3 +5003,58 @@ def test_body(args) = callee(1, *args)
49945003
array.clear
49955004
test_body(array)
49965005
}
5006+
5007+
# regression test for splatting empty array to cfunc
5008+
assert_normal_exit %q{
5009+
def test_body(args) = Array(1, *args)
5010+
5011+
test_body([])
5012+
0x100.times do
5013+
array = Array.new(100)
5014+
array.clear
5015+
test_body(array)
5016+
end
5017+
}
5018+
5019+
# compiling code shouldn't emit warnings as it may call into more Ruby code
5020+
assert_equal 'ok', <<~'RUBY'
5021+
# [Bug #20522]
5022+
$VERBOSE = true
5023+
Warning[:performance] = true
5024+
5025+
module StrictWarnings
5026+
def warn(msg, **)
5027+
raise msg
5028+
end
5029+
end
5030+
Warning.singleton_class.prepend(StrictWarnings)
5031+
5032+
class A
5033+
def compiled_method(is_private)
5034+
@some_ivar = is_private
5035+
end
5036+
end
5037+
5038+
shape_max_variations = 8
5039+
if defined?(RubyVM::Shape::SHAPE_MAX_VARIATIONS) && RubyVM::Shape::SHAPE_MAX_VARIATIONS != shape_max_variations
5040+
raise "Expected SHAPE_MAX_VARIATIONS to be #{shape_max_variations}, got: #{RubyVM::Shape::SHAPE_MAX_VARIATIONS}"
5041+
end
5042+
5043+
100.times do |i|
5044+
klass = Class.new(A)
5045+
(shape_max_variations - 1).times do |j|
5046+
obj = klass.new
5047+
obj.instance_variable_set("@base_#{i}", 42)
5048+
obj.instance_variable_set("@ivar_#{j}", 42)
5049+
end
5050+
obj = klass.new
5051+
obj.instance_variable_set("@base_#{i}", 42)
5052+
begin
5053+
obj.compiled_method(true)
5054+
rescue
5055+
# expected
5056+
end
5057+
end
5058+
5059+
:ok
5060+
RUBY

0 commit comments

Comments
 (0)