92734 Commits

Author SHA1 Message Date
John Hawthorn
cfc006d410 Always use atomics to get the shape count
When sharing between threads we need both atomic reads and writes. We
probably didn't need to use this in some cases (where we weren't running
in multi-ractor mode) but I think it's best to be consistent.
2025-07-09 10:38:04 -07:00
John Hawthorn
5dfd86cf3f Fix off-by-one in shape_tree_mark/shape_tree_compact
This was using < so subtract one from the last shape id would have us
miss the last inserted shape. I think this is unlikely to have caused
issues because I don't think the newest shape will ever have edges.

We do need to use `- 1` because otherwise RSHAPE wraps around and
returns the root shape.
2025-07-09 10:38:04 -07:00
BurdetteLamar
1de0b28cbb [DOC] Tweaks for String#chomp 2025-07-09 11:54:23 -04:00
BurdetteLamar
f17e5c4d5a [DOC] Tweaks for String#chomp! 2025-07-09 11:54:07 -04:00
Andrew Konchin
087387794a Update to ruby/spec@ed254ba 2025-07-09 15:11:17 +02:00
Nobuyoshi Nakada
ba246c5a16
[ruby/io-wait] Revert "Fix dependency for ruby 2.6"
This reverts commit https://github.com/ruby/io-wait/commit/2eb3841e9c8f.

Ruby 2.6 support has been dropped.

https://github.com/ruby/io-wait/commit/bcc343683e
2025-07-09 20:18:32 +09:00
Nobuyoshi Nakada
0c1c3ffa22 [ruby/io-wait] Revert https://github.com/ruby/io-wait/pull/9 "Make
the gem a noop on Rubies older than
2.6"

This reverts commit https://github.com/ruby/io-wait/commit/75fcb74c327f.

The version that does nothing with pre-ruby 2.6 has already been
released, so there is no longer need to consider older rubies in newer
versions.

https://github.com/ruby/io-wait/commit/930d2f0d07
2025-07-09 10:34:56 +00:00
Nobuyoshi Nakada
ddeefa2e7e [ruby/io-wait] Bump up the required ruby version
io-wait became a default gem at ruby 3.0.
Even it can be installed on earlier versions, but the standard library
will be loaded instead of the installed gem.

https://github.com/ruby/io-wait/commit/15b96736cd
2025-07-09 10:34:54 +00:00
Nobuyoshi Nakada
25afe7ef64
Rename variables to suit each method 2025-07-09 17:56:38 +09:00
Nobuyoshi Nakada
cd10afedb5
Removed a left over from c71a60c1dd02
0a0eb2807ed7 has already replaced most of that code.
2025-07-09 17:56:37 +09:00
Nobuyoshi Nakada
3f0e0d5c8b [ruby/io-nonblock] Bump up the required ruby version
io-nonblock became a default gem at ruby 3.0.
Even it can be installed on earlier versions, but the standard library
will be loaded instead of the installed gem.

https://github.com/ruby/io-nonblock/commit/c86d0d37af
2025-07-09 06:59:58 +00:00
Sweta Sanghavi
4ed2757543 [rubygems/rubygems] Update gemspec based on provided github username when exists
* Conditionally set changelog_url if gh username passed
and enabled
* conditionally set homepage, source code uri, homepage uri when gh
  username passed in
* update documentation to say username will also be used for gemspec file

https://github.com/rubygems/rubygems/commit/1c1ada593b
2025-07-09 13:48:37 +09:00
Peteris Rudzusiks
3feba181ed [rubygems/rubygems] Let s3_uri_signer accept the HTTP method
https://github.com/rubygems/rubygems/commit/35fc7f9547
2025-07-09 13:48:37 +09:00
Peteris Rudzusiks
5d880b75ef [rubygems/rubygems] Correctly sign S3 HEAD requests
We sometimes send HEAD requests. The s3_uri_signer.rb code allways assumed GETs.
This lead to consistently getting 403 responses back from S3. Recently, S3
attempted to change the behaviour of how 403s are handled when TCP connections
are reused,  which escalated this bug from "just noise" to "breaks gem installs".
They've reverted that behaviour, so the severity of this problem is back to
"just noise". Either way, it's a bug in rubygems and warrants a fix it.

https://github.com/rubygems/rubygems/commit/c38f502b73
2025-07-09 13:48:36 +09:00
Peteris Rudzusiks
af6012b942 [rubygems/rubygems] Fix date format in S3 URI signer
%M is minute of the hour.
%m is month of year.
We want the former, not the latter.

https://github.com/rubygems/rubygems/commit/d7ca3fa279
2025-07-09 13:48:35 +09:00
David Rodríguez
c6da019770 [rubygems/rubygems] Add blank line after every question
To try make output a bit less messy.

https://github.com/rubygems/rubygems/commit/92c8bc6769
2025-07-09 13:48:34 +09:00
David Rodríguez
9942ff7c6a [rubygems/rubygems] Use shorter questions as prompts in bundle gem
If we use long explanations as prompts, sometimes the prompt gets
printed twice due to a (I think) reline/readline bug.

https://github.com/rubygems/rubygems/commit/987e0dfa90
2025-07-09 13:48:33 +09:00
David Rodríguez
9b0f9f8139 [rubygems/rubygems] Reword MIT explanation to make sense after reordering
Previous wording assumed explanation was displayed after the question,
not before.

https://github.com/rubygems/rubygems/commit/04eb3430ba
2025-07-09 13:48:32 +09:00
Stan Lo
e9cd3060ac
ZJIT: Support guarding *Exact types (#13797)
ZJIT already can generate guard type instructions for *Exact types.

For example:

```
def test(strings)
  strings.map do |string|
    string.bytesize
  end
end

test(["foo", "bar"])
```

```
HIR:
fn block in test:
bb0(v0:BasicObject, v1:BasicObject):
  PatchPoint MethodRedefined(String@0x1014be890, bytesize@0x19f1)
  v7:StringExact = GuardType v1, StringExact
  v8:Fixnum = CCall bytesize@0x16fa4cc18, v7
  Return v8

```

But zjit only supported guarding fixnums so this script would panic.

This commit adds support for guarding *Exact types.
2025-07-08 23:56:52 -04:00
Hiroshi SHIBATA
5aaedc052c Re-ordered vcpkg related steps. It may be affected with VsDevCmd.bat 2025-07-09 06:26:42 +09:00
Hiroshi SHIBATA
80bf0744a0 Use the latest version of Visual Studio with windows-2022 runner image 2025-07-09 06:26:42 +09:00
Max Bernstein
c691095f2e ZJIT: Use BitSet in HIR 2025-07-08 15:57:31 -04:00
Max Bernstein
e59f404bea ZJIT: Add a BitSet type 2025-07-08 15:57:31 -04:00
Stan Lo
342ada1546 ZJIT: Use nil? optimization to test guard generation against different types 2025-07-08 15:51:44 -04:00
Stan Lo
79915e6f78 ZJIT: Profile nil? calls
This allows ZJIT to profile `nil?` calls and create type guards for
its receiver.

- Add `zjit_profile` to `opt_nil_p` insn
- Start profiling `opt_nil_p` calls
- Use `runtime_exact_ruby_class` instead of `exact_ruby_class` to determine
  the profiled receiver class
2025-07-08 15:51:43 -04:00
BurdetteLamar
b16047088a [DOC] Tweaks for String#chars 2025-07-08 13:26:58 -04:00
BurdetteLamar
14971e75ce [DOC] Tweaks for String#center 2025-07-08 13:26:46 -04:00
Stan Lo
9e4157a01c ZJIT: Make type definition code more consistent 2025-07-08 12:28:03 -04:00
Stan Lo
af892c1be3 ZJIT: More accurately model Class types 2025-07-08 12:28:03 -04:00
Stan Lo
6c20082852 ZJIT: Support inference of ModuleExact type 2025-07-08 12:28:03 -04:00
Nobuyoshi Nakada
f5acefca44 [ruby/uri] Prefer dedicated assertion methods
https://github.com/ruby/uri/commit/d79b3f5b94
2025-07-08 10:30:30 +00:00
Nobuyoshi Nakada
100c04307f [ruby/etc] Prefer dedicated assertions
https://github.com/ruby/etc/commit/9caddede76
2025-07-08 10:00:21 +00:00
Nobuyoshi Nakada
7ce4db8409 [ruby/delegate] Prefer dedicated assertions
https://github.com/ruby/delegate/commit/5ee4189537
2025-07-08 09:25:03 +00:00
git
c913a635d7 Update default gems list at b9782ab8932f9fb6a24a0522c579ca [ci skip] 2025-07-08 07:26:18 +00:00
Hiroshi SHIBATA
b9782ab893 [ruby/resolv] v0.6.2
https://github.com/ruby/resolv/commit/a28aaed4cb
2025-07-08 07:25:26 +00:00
Yusuke Endoh
9aa0300db2 [ruby/resolv] Limit decompressed name length
RFC 1035 specifies the 255-octet maximum name length. This change set
checks the limit.

https://github.com/ruby/resolv/commit/4c2f71b5e8
2025-07-08 07:25:26 +00:00
Nobuyoshi Nakada
680383c642 [ruby/tsort] Exclude gemspec and git-related files
https://github.com/ruby/tsort/commit/bf2e3a8695
2025-07-08 06:36:18 +00:00
Nobuyoshi Nakada
51de7c75e5 [ruby/tsort] Use git magic signatures to exclude files
https://github.com/ruby/tsort/commit/ab55dcb7f3
2025-07-08 06:36:17 +00:00
Nobuyoshi Nakada
7578655767 [ruby/tsort] [DOC] Document constants
https://github.com/ruby/tsort/commit/1d1711ad23
2025-07-08 06:11:04 +00:00
Stan Lo
e0841a795b
ZJIT: Fix Rust warnings (#13813) 2025-07-07 23:46:21 +00:00
Takashi Kokubun
0239809ab9 Remove test/.excludes/_appveyor
We don't run AppVeyor anymore, so we shouldn't need this.
2025-07-07 16:32:35 -07:00
Burdette Lamar
e9d7e105ef
[DOC] Tweaks for String#casecmp? (#13810) 2025-07-07 15:14:56 -04:00
BurdetteLamar
c2c0c220a8 [DOC] Tweaks for String#casecmp 2025-07-07 15:10:17 -04:00
Daniel Colson
1f024cfdba
ZJIT: Add opnds macro for Vec<InsnId> to Vec<Opnd> (#13805)
Along the same lines as the `opnd` macro we already have, but for a
`Vec<InsnId>` instead of a single `InsnId`.

This gets a few for loops and `jit.get_opnd` calls out of the `gen_`
functions.
2025-07-07 11:26:49 -07:00
Ken Jin
c1937480ac
ZJIT: Add a simple HIR validator (#13780)
This PR adds a simple validator for ZJIT's HIR.

See issue https://github.com/Shopify/ruby/issues/591
2025-07-07 11:45:01 -04:00
Jean Boussier
0bb44f291e Rename ractor_safe_set into concurrent_set
There's nothing ractor related in them, and the classic terminology
for these sort of data structures is `concurrent-*`, e.g.
concurrent hash.
2025-07-07 15:12:39 +02:00
BurdetteLamar
0604d0c9db [DOC] Tweaks for String#capitalize! 2025-07-07 09:03:02 -04:00
Burdette Lamar
987b5bf972
[DOC] Tweaks for String#capitalize 2025-07-07 09:02:15 -04:00
Jean Boussier
482f4cad82 Autoload encodings on the main ractor
None of the datastructures involved in the require process are
safe to call on a secondary ractor, however when autoloading
encodings, we do so from the current ractor.

So all sorts of corruption can happen when using an autoloaded
encoding for the first time from a secondary ractor.
2025-07-07 12:44:21 +02:00
Daniel Colson
002d746418 ZJIT: Avoid double negative in Mem debug
Prior to this commit the debug output for negative offsets would look
like:

```
Mem64[Reg(3) - -8
```

That makes it look like we're adding instead of subtracting. After this
commit we'll print:

```
Mem64[Reg(3) - 8
```
2025-07-07 15:12:20 +09:00