91898 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
2e3f81838c
Align styles [ci skip] 2025-05-15 17:48:40 +09:00
Nobuyoshi Nakada
427ede2dde
CI: Fix revision.h on Windows
- Quote % inside `if` block
- Use short branch name
2025-05-15 17:25:56 +09:00
Samuel Williams
87261c2d95
Ensure that forked process do not see invalid blocking operations. (#13343) 2025-05-15 15:50:15 +09:00
Nobuyoshi Nakada
49b306ecb9 [Bug #21333] Prohibit hash modification inside Hash#update block 2025-05-15 15:39:15 +09:00
Nobuyoshi Nakada
a5da3682ef
CI: Refine setup on Windows
Get rid of hardcoded paths
2025-05-15 15:08:43 +09:00
Samuel Williams
a4ce8639d9 Add continue-on-error to failed Windows 2025 build. 2025-05-15 14:51:02 +09:00
Burdette Lamar
7afee53fa0
[DOC] Tweaks for String#<< (#13306) 2025-05-14 15:24:30 -04:00
Burdette Lamar
10e8119cff
[DOC] Tweaks for String#== (#13323) 2025-05-14 15:24:19 -04:00
Jean Boussier
76ec41bf3d Bump ABI_VERSION
`struct RTypedData` was changed significantly in https://github.com/ruby/ruby/pull/13190
which breaks many extensions.

Bumping the ABI version might save some people from needlessly
investigating crashes.
2025-05-14 21:01:32 +02:00
Burdette Lamar
b00a339603
[DOC] Tweaks for String#[] (#13335) 2025-05-14 14:34:09 -04:00
BurdetteLamar
1f72512b03 [DOC] Tweaks for String#[]= 2025-05-14 14:33:40 -04:00
git
ee7dcef0f6 Update default gems list at 57f8dde0f2228dbc67503403d740a7 [ci skip] 2025-05-14 17:11:57 +00:00
Takashi Kokubun
57f8dde0f2 [ruby/erb] Version 5.0.1
https://github.com/ruby/erb/commit/42f389dc45
2025-05-14 17:10:04 +00:00
Takashi Kokubun
ef0e4406c8 Revert "Set WASMTIME_BACKTRACE_DETAILS=1 for WASM basictest"
This reverts commit cb88edf0bfdc2ce6bfbe3b4e0463a4c2dc5d2230.

It didn't help. You need to go to a different repository (ruby/ruby.wasm)
to see meaningful backtraces.
https://github.com/ruby/ruby.wasm/actions/runs/15000135135/job/42144675968#step:16:176
2025-05-14 10:06:28 -07:00
Alan Wu
1825ae4567 ZJIT: Add CI runs for building with YJIT 2025-05-15 00:39:03 +09:00
Alan Wu
92b218fbc3 YJIT: ZJIT: Allow both JITs in the same build
This commit allows building YJIT and ZJIT simultaneously, a "combo
build". Previously, `./configure --enable-yjit --enable-zjit` failed. At
runtime, though, only one of the two can be enabled at a time.

Add a root Cargo workspace that contains both the yjit and zjit crate.
The common Rust build integration mechanisms are factored out into
defs/jit.mk.

Combo YJIT+ZJIT dev builds are supported; if either JIT uses
`--enable-*=dev`, both of them are built in dev mode.

The combo build requires Cargo, but building one JIT at a time with only
rustc in release build remains supported.
2025-05-15 00:39:03 +09:00
Jean Boussier
b5575a80bc Reduce Object#object_id contention.
If the object isn't shareable and already has a object_id
we can access it without a lock.

If we need to generate an ID, we may need to lock to find
the child shape.

We also generate the next `object_id` using atomics.
2025-05-14 14:41:46 +02:00
Alan Wu
920dc0fe3a ZJIT: Split long use line and add a module doc. 2025-05-14 20:13:26 +09:00
Alan Wu
4eff1727e3 ZJIT: More tests for parsing param forms 2025-05-14 20:13:26 +09:00
Alan Wu
37d6de5331 ZJIT: Infer ArrayExact for the rest parameter
The rest parameter is always a rb_cArray, even when anonymous. (This is
different from kw_rest, which can be nil.)
2025-05-14 20:13:26 +09:00
Alan Wu
767e8e165a ZJIT: Fix rest parameter not parsed into a BB parameter
Use total parameter size instead of lead parameter size when parsing
iseq into hir. Also, copy over IntoUsize for compile-time checked
u32->usize cast.
2025-05-14 20:13:26 +09:00
Alan Wu
074dce8370 ZJIT: Add IntoUsize, ported from YJIT 2025-05-14 20:13:26 +09:00
Jean Boussier
f9c3feccf4 Rename id_to_obj_tbl -> id2ref_tbl
As well as associated functions, this should make it more obvious
what the purpose is.
2025-05-14 11:41:14 +02:00
Jean Boussier
9400119702 Fix object_id for classes and modules in namespace context
Given classes and modules have a different set of fields in every
namespace, we can't store the object_id in fields for them.

Given that some space was freed in `RClass` we can store it there
instead.
2025-05-14 10:26:48 +02:00
Jean Boussier
130d6aaef2 Reclaim one VALUE from rb_classext_t by shrinking super_classdepth
By making `super_classdepth` `uint16_t`, classes and modules can
now fit in 160B slots again.

The downside of course is that before `super_classdepth` was large
enough we never had to care about overflow, as you couldn't
realistically create enough classes to ever go over it.

With this change, while it is stupid, you could realistically
create an ancestor chain containing 65k classes and modules.
2025-05-14 10:17:03 +02:00
Hiroshi SHIBATA
f855bcc6b2
Applied rake vendor:install 2025-05-14 15:13:45 +09:00
Hiroshi SHIBATA
cc3d304b47
[rubygems/rubygems] Try cgi-0.5.0.beta2
https://github.com/rubygems/rubygems/commit/5d5e37bf23
2025-05-14 15:13:45 +09:00
David Rodríguez
a89460a8a0
[rubygems/rubygems] Reenable skipped specs in truffleruby since they should be fixed
https://github.com/rubygems/rubygems/commit/a7cbec95c1
2025-05-14 15:13:45 +09:00
Hiroshi SHIBATA
52d72979ae
[rubygems/rubygems] Update vendored version and patch for net-http and net-http-persistent
https://github.com/rubygems/rubygems/commit/b9a4722d5e
2025-05-14 15:13:45 +09:00
Hiroshi SHIBATA
a7af85a7bd Use gh cache 2025-05-14 15:08:52 +09:00
Hiroshi SHIBATA
af74130544 Purge the oldest TRAP cache with gh actions-cache cli 2025-05-14 15:08:52 +09:00
Hiroshi SHIBATA
3b459b5ab6 Disabled TRAP cache of CodeQL 2025-05-14 15:08:52 +09:00
John Hawthorn
86f5cec782 Add misc/tsan_suppressions.txt 2025-05-13 20:09:30 -07:00
Nobuyoshi Nakada
7793b59c8d
[Bug #21331] Prohibit hash modification during stlike loop 2025-05-14 10:37:59 +09:00
Nobuyoshi Nakada
7f5b4fb26e
Remove unused retval assignments 2025-05-14 10:26:04 +09:00
Nobuyoshi Nakada
b66c5c3b1b
Revert "[Bug #21331] Prohibit modification during stlike loop"
This reverts commit bb180b87b43c45e17ff49735a26d7a188d5c8396, which
caused "malloc during GC" error on wasm.
2025-05-14 10:23:16 +09:00
Takashi Kokubun
cb88edf0bf Set WASMTIME_BACKTRACE_DETAILS=1 for WASM basictest
https://github.com/ruby/ruby/actions/runs/15008767265/job/42173424631
"error while executing at wasm backtrace" doesn't have meaningful
symbols. We can't debug this from just looking at the "[BUG] Cannot
malloc during GC" message.

As suggested by the error message, this commit sets WASMTIME_BACKTRACE_DETAILS=1.
Let me see if this improves the backtrace.
2025-05-13 17:05:28 -07:00
Takashi Kokubun
1d3221ad28 [ruby/erb] Give up on using resolve_feature_path
Apparently `$LOAD_PATH.resolve_feature_path('erb/escape')` returns true
for miniruby but `require 'erb/escape'` fails on it.

I still don't want to check it and rescue LoadError at the same time
because the code looks too complicated. Let me just rescue LoadError for
platforms that don't build native extensions.

https://github.com/ruby/erb/commit/3081c6b20f
2025-05-13 23:54:02 +00:00
Takashi Kokubun
e8e7daa71a [ruby/erb] Reapply "Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)"

This reverts commit https://github.com/ruby/erb/commit/1c9200aab071.

Now that we've bumped BASERUBY, we shouldn't need to rescue the
LoadError.

https://github.com/ruby/erb/commit/846b20fe0e
2025-05-13 23:31:02 +00:00
Takashi Kokubun
2279da2c91
Bump the required BASERUBY version to 3.1 (#13321) 2025-05-13 13:39:45 -07:00
Jean Boussier
b6698114e6 Add specs for Set mutation during iteration 2025-05-13 22:30:50 +02:00
Jean Boussier
1ee4b43a56 Set#merge: raise if called during iteration
[Bug #21332]
2025-05-13 22:27:42 +02:00
Luke Gruber
1d4822a175 Get ractor message passing working with > 1 thread sending/receiving values in same ractor
Rework ractors so that any ractor action (Ractor.receive, Ractor#send, Ractor.yield, Ractor#take,
Ractor.select) will operate on the thread that called the action. It will put that thread to sleep if
it's a blocking function and it needs to put it to sleep, and the awakening action (Ractor.yield,
Ractor#send) will wake up the blocked thread.

Before this change every blocking ractor action was associated with the ractor struct and its fields.
If a ractor called Ractor.receive, its wait status was wait_receiving, and when another ractor calls
r.send on it, it will look for that status in the ractor struct fields and wake it up. The problem was that
what if 2 threads call blocking ractor actions in the same ractor. Imagine if 1 thread has called Ractor.receive
and another r.take. Then, when a different ractor calls r.send on it, it doesn't know which ruby thread is associated
to which ractor action, so what ruby thread should it schedule? This change moves some fields onto the ruby thread
itself so that ruby threads are the ones that have ractor blocking statuses, and threads are then specifically scheduled
when unblocked.

Fixes [#17624]
Fixes [#21037]
2025-05-13 13:23:57 -07:00
Takashi Kokubun
2fee379f8f Checkout .github on omnibus result for notifications
It currently fails like: Can't find 'action.yml'
2025-05-13 13:05:45 -07:00
Takashi Kokubun
cbaf85cb32 [ruby/erb] Update the reason why we need to rescue LoadError
https://github.com/ruby/erb/commit/c2d1f82817
2025-05-13 18:23:04 +00:00
Takashi Kokubun
c71f9b8aee [ruby/erb] Revert "Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)"

This reverts commit https://github.com/ruby/erb/commit/1c393aa738f3.

https://github.com/ruby/erb/commit/1c9200aab0
2025-05-13 18:23:04 +00:00
git
f82dce148c Update default gems list at 9db0704e67c8af3b47429e28e1da5e [ci skip] 2025-05-13 18:10:46 +00:00
Takashi Kokubun
9db0704e67 [ruby/erb] Version 5.0.0
https://github.com/ruby/erb/commit/08b544cdb8
2025-05-13 18:09:08 +00:00
Takashi Kokubun
8982bbcbee [ruby/erb] Publish constant ERB::VERSION
Even cgi.gem publicly defines CGI::VERSION today. It's just weird that
ERB::VERSION is kept private at this point.

https://github.com/ruby/erb/commit/46801cbd47
2025-05-13 18:07:17 +00:00
Takashi Kokubun
4a9d46ce07 [ruby/erb] Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)

https://github.com/ruby/erb/commit/1c393aa738
2025-05-13 18:00:07 +00:00