Skip to content

Conversation

luke-gruber
Copy link

Not all ractor-related encoding issues were fixed by 1afc07e. I found more by running my test-all branch with 3 ractors for each test.

@luke-gruber luke-gruber force-pushed the encoding_autoload_fixes branch 3 times, most recently from 515bdfb to 333c6e0 Compare August 15, 2025 21:47
At under a minute, this check runs faster than a lot of the other CI
checks, so we might as well show errors from `cargo check` to serve as a
smoke check in addition to surfacing warnings.
@luke-gruber luke-gruber force-pushed the encoding_autoload_fixes branch from 333c6e0 to 1f58aa7 Compare August 15, 2025 22:08
tekknolagi and others added 25 commits August 15, 2025 20:07
On systems where the Encoding.default_internal defaults to US-ASCII instead
of UTF-8, some tests using assert_raise_with_message can fail since it no
longer changes Encoding.default_internal in 79f5202.

This tests explicitly uses EnvUtil.with_default_internal on systems where
these tests fail.
The VPATH rule of NMake is different from others.  Abandon using
them in the rules for the generated source, locate them in the top
source directory, as well as the generated library files of prism.
The current oldest support Ruby version is 3.2. And Ruby 3.2 bundled
Bundler 2.5. It means RG 4.0 can drop to support Bundler 2.2.

rubygems/rubygems@592ac09b5c
…ation warning

Like others, it's a remembered option which we are deprecating in favor
of configuration.

rubygems/rubygems@9ea55e0df2
The `bundle list` command is a convenient way for human to know what gems and versions are available. By introducing a `--format=json` option, we can provide the same information to machines in a stable format that is robust to UI additions or modifications. It indirectly supports  `Gemfile.lock` modifications by discouraging external tools from attempting to parse that format.

This addition allows for the scripting of installation tools, such as buildpacks, that wish to branch logic based on gem versions. For example:

```ruby
require "json"

command = "bundle list --format=json"
output = `#{command}`
raise "Command `#{command}` errored: #{output}" unless $?.success?

railties = JSON.parse(output).find {|gem| gem["name"] == railties }
if railties && Gem::Version.new(railties["version"]) >= Gem::Version.new("7")
  puts "Using Rails greater than 7!"
end
```

The top level is an object with a single key, "gems", this structure allows us to add other information in the future (should we desire) without having to change the json schema.

rubygems/rubygems@9e081b0689
st0012 and others added 14 commits August 20, 2025 13:17
Bumps [github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) from master to dd3097e305afa53f7b4312371f62058d2e665320.
- [Release notes](https://github.com/microsoft/vcpkg/releases)
- [Commits](microsoft/vcpkg@65be701...dd3097e)

---
updated-dependencies:
- dependency-name: github.com/microsoft/vcpkg
  dependency-version: dd3097e305afa53f7b4312371f62058d2e665320
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
This commit adds two new methods to the `Math` module:

* `Math.log1p(x)`: Computes `Math.log(x + 1)`
* `Math.expm1(x)`: Computes `Math.exp(x) - 1`

These methods are often more accurate than the straightforward
computation, especially when `x` is close to zero.
The corresponding functions, `log1p` and `expm1`, are defined in the C99
standard math library.

[Feature #21527]
`RUBY_CXX_DEPRECATED` is overridden using `RBIMPL_ATTR_DEPRECATED` in
include/ruby/backward/2/attributes.h already.
[Bug #21547]

Followup: ruby#14201

When adding an instance variable and the IMEMO/fields need to be
larger, we allocate a new one and clear the old one.

Since the old one may still be in other ec's cache, on a hit we must
check the IMEMO/fields isn't a stale one.
We can use the `gen_push_opnds` and `gen_pop_opnds` helpers added in ruby#14200 to simplify the code.
Previously, ruby2_keywords could be used on a method or proc with
post arguments, but I don't think the behavior is desired:

```ruby
def a(*c, **kw) [c, kw] end
def b(*a, b) a(*a, b) end
ruby2_keywords(:b)

b({foo: 1}, bar: 1)
```

This changes ruby2_keywords to emit a warning and not set the
flag on a method/proc with post arguments.

While here, fix the ruby2_keywords specs for warnings, since they
weren't testing what they should be testing.  They all warned
because the method didn't accept a rest argument, not because it
accepted a keyword or keyword rest argument.
[Bug #20146]

Previously we dealt with the main Ractor not being enabled for M:N by
incrementing snt_cnt++. This worked for comparing against ractor count,
but meant that we always had one less SNT than was specified by
RUBY_MAX_CPU.

This was notably a problem for RUBY_MAX_CPU=1, which would cause Ractors
to hang.

This commit instead of adjusting snt, adjusts a
"schedulable_ractor_cnt". This way snt_cnt will actually reach
RUBY_MAX_CPU.
@jhawthorn jhawthorn force-pushed the encoding_autoload_fixes branch 3 times, most recently from 4f20ac5 to 50b8e7a Compare August 21, 2025 19:07
tekknolagi and others added 4 commits August 21, 2025 19:26
ruby#14270)

If the LiveRange looks like (idx, idx), we will currently not allocate a
register. This change allocates a register and then immediately
deallocates it.

Fix #614
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: Max Bernstein <[email protected]>
Co-authored-by: Aaron Patterson <[email protected]>
Thanks to nobu for pointing this out. This is a YJIT file so shouldn't
have ZJIT stuff in it. ZJIT doesn't support building on BSDs yet.

Fix: 92b218f
Make vm_search_method return a cme instead of a cc

Both of its callers ended up calling `vm_cc_cme` on the result and only
used the cme, so it's probably better to return a cme directly.

This will also make it easier for ZJIT to later inline the
`rb_vm_objtostring` call.
@luke-gruber luke-gruber force-pushed the encoding_autoload_fixes branch from c5f554d to 82cf3af Compare August 21, 2025 22:11
@luke-gruber luke-gruber force-pushed the encoding_autoload_fixes branch from 82cf3af to 4f0f3a8 Compare August 21, 2025 22:46
BurdetteLamar and others added 4 commits August 21, 2025 18:52
[Bug #21548]

In lazy sweeping, if we need to allocate an object in a heap where we
weren't able to free any slots, but we also either have empty pages or
could allocate new pages, then we want to preemptively claim a page
because it's possible that sweeping another heap will call gc_sweep_finish_heap,
which may use up all of the empty/allocatable pages. If other heaps are
not finished sweeping then we do not finish this GC and we will end up
triggering a new GC cycle during this GC phase.
Not all ractor-related encoding issues were fixed by 1afc07e.
I found more by running my test-all branch with 3 ractors for each test.
@jhawthorn jhawthorn force-pushed the encoding_autoload_fixes branch from 4f0f3a8 to f378052 Compare August 22, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.