92711 Commits

Author SHA1 Message Date
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
Jean Boussier
d0fdbef4ea [ruby/json] Improve consistency of code style
https://github.com/ruby/json/commit/a497c71960
2025-07-07 11:53:23 +09:00
License Update
e1d09ffe5d [rubygems/rubygems] Update SPDX license list as of 2025-07-01
https://github.com/rubygems/rubygems/commit/56b55a198a
2025-07-07 11:53:15 +09:00
David Rodríguez
3c552881d4 [rubygems/rubygems] Document that global_gem_cache also caches compiled extensions
https://github.com/rubygems/rubygems/commit/265f718be7
2025-07-07 11:53:14 +09:00
David Rodríguez
3eeffea28d [rubygems/rubygems] Improve sentence
"locally to the installing Ruby installation" felt a bit confusing.

https://github.com/rubygems/rubygems/commit/c950720719
2025-07-07 11:53:13 +09:00
David Rodríguez
6a5808965b [rubygems/rubygems] Stop allowing calling #gem on random objects
https://github.com/rubygems/rubygems/commit/4b8570ae15
2025-07-07 11:53:12 +09:00
David Rodríguez
845e878f88 [rubygems/rubygems] Add default_cli_command documentation
I suspect most experienced users won't like the change in defaults, so
document the setting to toggle back the current default.

https://github.com/rubygems/rubygems/commit/93e2e2bef9
2025-07-07 11:53:12 +09:00
David Rodríguez
cd3389e5c2 [rubygems/rubygems] Cancel path_relative_to_cwd change
It only affected the `--path` flag which is actually getting removed, so
I don't think it makes sense to make such change. The current behavior
is reasonable and I tried to codify it with a few more specs.

https://github.com/rubygems/rubygems/commit/6f520eb146
2025-07-07 11:53:11 +09:00
David Rodríguez
5fa484a441 [rubygems/rubygems] Move specs independent of gem name out of shared examples
And rename the shared examples to "paths dependent on gem name".

https://github.com/rubygems/rubygems/commit/cdcc8ba92a
2025-07-07 11:53:10 +09:00
David Rodríguez
6d696fa3b4 [rubygems/rubygems] Move specs independent from gem_name out of "generating a gem" shared specs
So that they don't run repeatedly.

https://github.com/rubygems/rubygems/commit/1f65e879f4
2025-07-07 11:53:09 +09:00
David Rodríguez
fab1323ab3 [rubygems/rubygems] Remove unnecessary nesting
https://github.com/rubygems/rubygems/commit/eac831a1b7
2025-07-07 11:53:08 +09:00
David Rodríguez
e7f11ecc2b [rubygems/rubygems] Actually run "generating a gem" shared examples for the more standard name
They were only being run for "edge case" names, yet it tests all kind of
things about generation.

https://github.com/rubygems/rubygems/commit/3e9d805eea
2025-07-07 11:53:08 +09:00
David Rodríguez
8a802f7e4e [rubygems/rubygems] Fix assertions to not depend on specific gem name
https://github.com/rubygems/rubygems/commit/27a4af859e
2025-07-07 11:53:07 +09:00
David Rodríguez
e95adbfa68 [rubygems/rubygems] Remove unnecessary nesting from standalone specs
Originally, all the specs in this file were put inside a shared examples
block, and since then all specs were run only changing the cwd (either
from root, or a subdirectory).

This was in https://github.com/rubygems/rubygems/commit/d7291700d016, to cover a fix in
the `bundler_path` method.

However, reverting that fix does not make any of the specs in either of
the main blocks fail! Only an unrelated spec of `bundle install
--standalone --local` fails.

The reason is that all specs set `path` to an absolute path, making the
fix essentially uncovered.

In order to simplify the file structure and improve runtime, I
completely removed the shared examples block, and only run main specs
for the root directory. Then I added a couple of extra specs to cover
the original bug fix.

This cuts runtime of this spec file in half, from 1m30s to 45s on my
laptop.

https://github.com/rubygems/rubygems/commit/cc506f17e0
2025-07-07 11:53:05 +09:00
David Rodríguez
9918ca1671 [rubygems/rubygems] Remove default_install_uses_path setting
The previous default can already be configured with `bundle config
path.system true`.

https://github.com/rubygems/rubygems/commit/cb483b79db
2025-07-07 11:53:00 +09:00
David Rodríguez
f609d3395e [rubygems/rubygems] Remove unnecessary feature flag check
This spec now only runs in Bundler 2 mode.

https://github.com/rubygems/rubygems/commit/f52cb240ca
2025-07-07 11:52:59 +09:00
David Rodríguez
fef0051926 [rubygems/rubygems] Remove auto_clean_without_path setting
There already different ways of toggling off this behavior, like setting
`bundle config clean false`, or configuring Bundler to install to system
gems with `bundle config path.system true`.

https://github.com/rubygems/rubygems/commit/6daa09f60a
2025-07-07 11:52:58 +09:00
git
4d7e622064 Update bundled gems list as of 2025-07-06 2025-07-06 07:04:24 +00:00
Kazuki Yamaguchi
b681739295 [ruby/openssl] pkey/ec: avoid calling SYM2ID() on user-supplied objects
Compare by the VALUE value instead of ID. Calling SYM2ID() on a dynamic
symbol will pin a permanent ID.

These methods only accept known static symbols, and passing anything
else is an incorrect usage that results in an exception. Nonetheless,
avoiding SYM2ID() seems to be a good idea since there is no runtime
cost.

https://github.com/ruby/openssl/commit/0d66296cdc
2025-07-05 14:03:32 +00:00
S-H-GAMELINKS
ad7d75c932 Remove LIKELY macro for Universal Parser
Ruby Parser not used LIKELY macro.
So, can remove it.
2025-07-05 19:38:49 +09:00
John Hawthorn
365317f6ba Fix wrong GENIV WB on too_complex Ractor traversal
WBCHECK ERROR: Missed write barrier detected!
      Parent object: 0x7c4a5f1f66c0 (wb_protected: true)
        rb_obj_info_dump: 0x00007c4a5f1f66c0 T_IMEMO/<fields>
      Reference counts - snapshot: 2, writebarrier: 0, current: 2, missed: 1
      Missing reference to: 0x7b6a5f2f7010
        rb_obj_info_dump: 0x00007b6a5f2f7010 T_ARRAY/Array [E ] len: 1 (embed)
2025-07-04 14:54:49 -07:00
John Hawthorn
12b0ce3875 Remove unused src param from rb_shape_copy_fields 2025-07-04 14:54:49 -07:00
John Hawthorn
8cd5832694 Fix wrong write barrier on fields copy
Previously this write barrier was using the destination object as the
new parent, rather than the fields object.

Found by wbcheck
2025-07-04 14:54:49 -07:00
John Hawthorn
32453560de Fix missed write barrier on Ractor send move
When moving a "generic IV" object, we need a write barrier to the fields
object.

   WBCHECK ERROR: Missed write barrier detected!
     Parent object: 0x7c913641d1a0 (wb_protected: true)
       rb_obj_info_dump: 0x00007c913641d1a0 T_ARRAY/Array [E ] len: 10 (embed)
     Reference counts - snapshot: 1, writebarrier: 0, current: 2, missed: 1
     Missing reference to: 0x7bf1364e56d0
       rb_obj_info_dump: 0x00007bf1364e56d0 T_IMEMO/<fields>
2025-07-04 14:54:49 -07:00