Skip to content

[pull] master from ruby:master#863

Merged
pull[bot] merged 11 commits intoturkdevops:masterfrom
ruby:master
Mar 19, 2026
Merged

[pull] master from ruby:master#863
pull[bot] merged 11 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 19, 2026

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 : )

Edouard-chin and others added 11 commits March 18, 2026 13:27
- ### Problem

  With the Bundler autoswitch feature, system Bundler may install
  a `bundler.gem` that matches the Gemfile.lock.
  The `bundler.gem` that gets downloaded is like any other gems,
  but its treated differently (it doesn't appear in the Gemfile specs
  and we also don't lock its checksum).

  If for any reason Bundler itself gets compromised, it's a security
  concern.

  ### Details

  I'd like to introduce this change into two separate changes for
  easier reviews.
  The first (this commit) only produce the checksum in the lockfile,
  nothings consumes it or verify it yet.

  The second patch will make sure that whenever the Bundler
  auto-install kicks in, Bundler will verify that the locked checksum
  matches the Bundler version being downloaded and installed.

  ### Solution

  Overall the solution here is similar to how checksums are already
  generated for other gems. However, the `bundler` gem comes from a
  different source (the `Bundler::Source::Metadata`) and so it needs
  to be handled slightly differently.

  A big part ot the change is test related. Instead of having to
  modify all tests that assert the state of the lockfile (which
  will be broken now, since the lockfile includes the Bundler
  checksum), I opted to automatically include the checksum whenever
  the helper metod `checksums_section` is called.

ruby/rubygems@9ce52a2188
ZJIT CI runs with --zjit-call-threshold=1 which JIT-compiles every
function on first call, adding significant overhead. The 5-second
timeout for test-syntax-suggest's "does not timeout on massive files"
test is too tight under this configuration, causing random failures
on slow CI runners. YJIT CI is unaffected at 5 seconds.
In `JSON.parse(doc, allow_duplicate_key: false)`.

ruby/json@393b41c3e5
In addition to compile-time knowledge, we can also (now that the global
regalloc has landed) check at run time if the value being stored is a
heap object.
`ar` with replace mode preserves old archive members that are no
longer in the input list. When object files like prism/node.o get
recompiled with different symbols (e.g. after prism updates), the
stale version in the archive can cause undefined reference errors
during zjit-test linking. Delete the archive first to ensure it
only contains current objects.
Today you can read instance variables from non-main Ractors, but many
Rails applications use cvars, and we cannot read them.

For example:

```ruby
class Foo
  # This is NOT allowed to be read in non-main Ractors
  @@bar = 123
  def self.bar; @@bar; end

  # This is allowed to be read in non-main Ractors
  @baz = 123
  def self.baz; @baz; end
end

  # This is OK
Ractor.new {
  p Foo.baz
}.value

  # Exception here
Ractor.new {
  p Foo.bar
}.value
```

This commit changes the semantics of cvars to be the same as instance
variables:

* It's ok to read Ractor shareable objects from the non-main Ractor
* It's NOT ok to write from the non-main Ractor

[Feature #21942]
@pull pull bot locked and limited conversation to collaborators Mar 19, 2026
@pull pull bot added the ⤵️ pull label Mar 19, 2026
@pull pull bot merged commit ab32c0e into turkdevops:master Mar 19, 2026
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.

7 participants