Skip to content

[pull] master from ruby:master#1188

Merged
pull[bot] merged 20 commits into
turkdevops:masterfrom
ruby:master
Jul 7, 2026
Merged

[pull] master from ruby:master#1188
pull[bot] merged 20 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jul 7, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

peterzhu2118 and others added 20 commits July 6, 2026 20:51
SHAPE_MAX_CAPACITY needed to be below or equal to the maximum capacity
allocatable by the GC otherwise it would crash. This commit decouples that
by adding back max_capacity in the rb_shape_tree_t and adding a new GC
API function rb_gc_impl_max_allocation_size to report the maximum size
allocatable by the GC.
Bumps the github-actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.82.9 to 2.82.10
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@4684b84...5041467)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.82.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Array#join now pre-calculates the length, so the string created in the
tests were embedded anyways.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
This section only had one method (#each), so move that
method to the "Other Methods" section.
Followup: #17671

[Bug #22184]

`onigmo.h` contains a lot of declarations that can easily
conflict with third party code, hence it's better to keep
it opaque. That however requires a few hacks.
This commit implements support in ZJIT for inlining GC fast path. The GC
fast path is defined in gc_fastpath.rs for both the default GC and MMTk.

For the default GC, the fast path uses the bump pointer allocator that
was implemented in #17201. If the bump
pointer region is full, it will bail out and fall back to the slow path.

This GC fast path is used by the newarray instruction in ZJIT in the empty
array case. We can see significant improvements in the following microbenchmark,
which allocates 100 million empty arrays:

    def run(max)
      i = 0
      while i < max
        a = []
        i += 1
      end
    end

    30.times { run(2) }
    run(100_000_000)

This microbenchmark runs 1.5x faster on my machine:

    Benchmark 1: master
      Time (mean ± σ):     583.3 ms ±  10.1 ms    [User: 569.3 ms, System: 12.0 ms]
      Range (min … max):   571.9 ms … 600.0 ms    10 runs

    Benchmark 2: branch
      Time (mean ± σ):     389.5 ms ±   8.2 ms    [User: 375.0 ms, System: 12.1 ms]
      Range (min … max):   380.2 ms … 405.3 ms    10 runs

    Summary
      branch ran
        1.50 ± 0.04 times faster than master
If the slot size is dynamic, a string of length (max_embed_len - 1) will
have exact capacity rather than rounded up to max_embed_len.
To avoid confusion with the actual capacity which may be larger
if the object has been extended (ROBJECT_HEAP).
Like the capacity part, the layout part of an object shape
almost never changes. The few exceptions are:

  - On allocation.
  - On being compacted by GC.
  - When RObject oberflows.

As such it simplifies a lot of code if `RBASIC_SET_SHAPE_ID` strips
the layout bits, as we often copy the shape from IMEMO/fields to
the owner object and vice-versa.

Also change `RBASIC_SET_SHAPE_ID_WITH_CAPACITY` into
`RBASIC_SET_FULL_SHAPE_ID` so it can be used for assigning both
capacity and layout.
Lean on `rb_newobj` to get the shape embedded capacity properly
set.
Fix unexpected `keyword_do_LAMBDA` inside string interpolation within
default argument of lambda.
@pull pull Bot locked and limited conversation to collaborators Jul 7, 2026
@pull pull Bot added the ⤵️ pull label Jul 7, 2026
@pull pull Bot merged commit 3f7d4bc into turkdevops:master Jul 7, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants