Skip to content

Commit d009adf

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-version-3
2 parents b8b3af7 + 4646ab8 commit d009adf

File tree

100 files changed

+791
-680
lines changed

Some content is hidden

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

100 files changed

+791
-680
lines changed

.github/workflows/dependabot_automerge.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# from https://github.com/gofiber/swagger/blob/main/.github/workflows/dependabot_automerge.yml
22
name: Dependabot auto-merge
33
on:
4-
pull_request_target:
4+
pull_request:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
59

610
jobs:
711
automerge:
812
runs-on: ubuntu-latest
9-
10-
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
11-
13+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'ruby/ruby'
1214
steps:
1315
- name: Dependabot metadata
1416
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
107107
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
108-
scoop install vcpkg
108+
scoop install vcpkg cmake@3.31.6
109109
shell: pwsh
110110

111111
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

NEWS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ The following bundled gems are promoted from default gems.
3535
* logger 1.7.0
3636
* rdoc 6.13.1
3737
* win32ole 1.9.1
38-
* irb 1.15.1
39-
* reline 0.6.0
38+
* irb 1.15.2
39+
* reline 0.6.1
4040
* readline 0.0.4
4141
* fiddle 1.1.6
4242

@@ -66,14 +66,15 @@ The following bundled gems are added.
6666
The following bundled gems are updated.
6767

6868
* minitest 5.25.5
69+
* test-unit 3.6.8
6970
* rexml 3.4.1
7071
* net-imap 0.5.6
7172
* net-smtp 0.5.1
7273
* rbs 3.9.2
7374
* bigdecimal 3.1.9
7475
* syslog 0.3.0
7576
* csv 3.3.3
76-
* repl_type_completor 0.1.10
77+
* repl_type_completor 0.1.11
7778

7879
## Supported platforms
7980

bootstraptest/test_method.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,3 +1419,11 @@ def internal_foo = foo
14191419
"ok"
14201420
end
14211421
}
1422+
1423+
assert_equal 'ok', <<~RUBY
1424+
def test(*, kw: false)
1425+
"ok"
1426+
end
1427+
1428+
test
1429+
RUBY

bootstraptest/test_ractor.rb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ class C
16361636
16371637
1_000.times { idle_worker, tmp_reporter = Ractor.select(*workers) }
16381638
"ok"
1639-
} if !yjit_enabled? || ENV['GITHUB_WORKFLOW'] == 'ModGC' # flaky
1639+
} if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky
16401640

16411641
assert_equal "ok", %q{
16421642
def foo(*); ->{ super }; end
@@ -2101,3 +2101,24 @@ def ==(o)
21012101
:fail
21022102
end
21032103
}
2104+
2105+
# move objects inside frozen containers
2106+
assert_equal 'ok', %q{
2107+
ractor = Ractor.new { Ractor.receive }
2108+
obj = Array.new(10, 42)
2109+
original = obj.dup
2110+
ractor.send([obj].freeze, move: true)
2111+
roundtripped_obj = ractor.take[0]
2112+
roundtripped_obj == original ? :ok : roundtripped_obj
2113+
}
2114+
2115+
# move object with generic ivar
2116+
assert_equal 'ok', %q{
2117+
ractor = Ractor.new { Ractor.receive }
2118+
obj = Array.new(10, 42)
2119+
obj.instance_variable_set(:@array, [1])
2120+
2121+
ractor.send(obj, move: true)
2122+
roundtripped_obj = ractor.take
2123+
roundtripped_obj.instance_variable_get(:@array) == [1] ? :ok : roundtripped_obj
2124+
}

compile.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,13 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
25972597
else {
25982598
body->is_entries = NULL;
25992599
}
2600-
body->call_data = ZALLOC_N(struct rb_call_data, body->ci_size);
2600+
2601+
if (body->ci_size) {
2602+
body->call_data = ZALLOC_N(struct rb_call_data, body->ci_size);
2603+
}
2604+
else {
2605+
body->call_data = NULL;
2606+
}
26012607
ISEQ_COMPILE_DATA(iseq)->ci_index = 0;
26022608

26032609
// Calculate the bitmask buffer size.
@@ -13375,6 +13381,11 @@ ibf_load_ci_entries(const struct ibf_load *load,
1337513381
unsigned int ci_size,
1337613382
struct rb_call_data **cd_ptr)
1337713383
{
13384+
if (!ci_size) {
13385+
*cd_ptr = NULL;
13386+
return;
13387+
}
13388+
1337813389
ibf_offset_t reading_pos = ci_entries_offset;
1337913390

1338013391
unsigned int i;

doc/contributing.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/contributing/contributing.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing to Ruby
2+
3+
## Ruby Issues
4+
5+
To report an issue in the Ruby core:
6+
7+
* [Report issues](reporting_issues.md).
8+
9+
## Ruby Core
10+
11+
To contribute to the Ruby core functionality,
12+
you'll need initially to:
13+
14+
* [Build Ruby](building_ruby.md) on your system.
15+
* [Test Ruby](testing_ruby.md), to make sure the build is correct.
16+
17+
Then:
18+
19+
* [Make changes to Ruby](making_changes_to_ruby.md).
20+
21+
And possibly:
22+
23+
* [Benchmark Ruby](https://github.com/ruby/ruby/tree/master/benchmark#make-benchmark).
24+
25+
## Ruby Documentation
26+
27+
To contribute to the Ruby core documentation, see:
28+
29+
* [Making changes to the Ruby documentation](documentation_guide.md).
30+
31+
## Ruby Standard Library
32+
33+
To contribute to the Ruby Standard Library, see:
34+
35+
* [Making changes to the Ruby Standard Library](making_changes_to_stdlibs.md).

doc/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ divided by 0
181181

182182
Two read-only global variables always have `nil` value
183183
except in a rescue clause;
184-
there:
184+
they're:
185185

186186
- `$!`: contains the rescued exception.
187187
- `$@`: contains its backtrace.

doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Use the following links to access the comprehensive set of libraries included wi
5151

5252
Get involved with the Ruby community:
5353

54-
- [Contribution Guide](rdoc-ref:contributing.md)
54+
- [Contribution Guide](rdoc-ref:contributing/contributing.md)
5555
- [Documentation Guide](rdoc-ref:contributing/documentation_guide.md)
5656
- [Reporting Issues](rdoc-ref:contributing/reporting_issues.md)
5757
- [Building Ruby](rdoc-ref:contributing/building_ruby.md)

0 commit comments

Comments
 (0)