96212 Commits

Author SHA1 Message Date
git
b90d3a6bee Update bundled gems list as of 2025-12-19 2025-12-19 02:44:57 +00:00
Soutaro Matsumoto
81ad407475
Fix rbs test failure caused by minitest-6 (#15643)
* Fix rbs test failure caused by minitest6
* Bundle minitest-6.0.0
2025-12-19 02:43:58 +00:00
Aaron Patterson
68a900e30b add news for pack / unpack directives 2025-12-18 17:57:00 -08:00
git
fec5363ba6 Update default gems list at 5c0c0dd8737c8225f0ebcf0eaf3fb8 [ci skip] 2025-12-19 00:59:55 +00:00
Kevin Newton
5c0c0dd873 [ruby/prism] Bump to v1.7.0
https://github.com/ruby/prism/commit/21c499d6e4
2025-12-18 19:58:53 -05:00
Earlopain
e2c886dd66 [ruby/prism] Reject p(p a, &block => value) and similar
Redo of https://github.com/ruby/prism/pull/3669 with more tests

https://github.com/ruby/prism/commit/48b403ea79
2025-12-18 19:58:53 -05:00
Earlopain
76248400b7 [ruby/prism] Add Ruby 4.1 as a version specifier
https://github.com/ruby/prism/commit/138db9ccc4
2025-12-18 19:58:53 -05:00
Benoit Daloze
d9b03c9369 [ruby/prism] Fix assertions in location_test.rb
* assert_raise's 2nd argument is the failure message,
  shown when the expected exception is not raised.
  It's not the expected message.
  See https://github.com/test-unit/test-unit/issues/347

https://github.com/ruby/prism/commit/e3df994d47
2025-12-18 19:58:53 -05:00
John Hawthorn
0c4fcdff32 Update ArgumentError message for Ractor.select 2025-12-18 16:47:35 -08:00
Burdette Lamar
b14f2f0116
[DOC] Harmonize lt methods 2025-12-18 19:21:00 -05:00
John Hawthorn
084b916a5b [DOC] Update NEWS for implementation improvements 2025-12-18 16:00:35 -08:00
John Hawthorn
805f53a9b1 [DOC] Various improvements to NEWS 2025-12-18 16:00:35 -08:00
John Hawthorn
535233c68c [DOC] Update ractor.rb docs 2025-12-18 15:59:49 -08:00
John Hawthorn
3c6a6afa1c [DOC] Update ractor.c docs 2025-12-18 15:59:49 -08:00
BurdetteLamar
99b915944f [DOC] Russian strings should look Russian 2025-12-18 17:47:18 -05:00
Aaron Patterson
d0b72429a9 Add support for signed and unsigned LEB128 to pack/unpack.
This commit adds a new pack format command `R` and `r` for unsigned and
signed LEB128 encoding.  The "r" mnemonic is because this is a
"vaRiable" length encoding scheme.

LEB128 is used in various formats including DWARF, WebAssembly, MQTT,
and Protobuf.

[Feature #21785]
2025-12-18 14:42:47 -08:00
John Hawthorn
73e930f9f9 JIT: Move EC offsets to jit_bindgen_constants
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
2025-12-18 13:43:45 -08:00
John Hawthorn
b1c3060bed Co-authored-by: Luke Gruber <luke.gru@gmail.com>
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>

YJIT: Support calling bmethods in Ractors

Co-authored-by: Luke Gruber <luke.gru@gmail.com>

Suggestion from Alan
2025-12-18 13:43:45 -08:00
John Hawthorn
345ea0c8e1 YJIT: Support calling bmethods in Ractors
Co-authored-by: Luke Gruber <luke.gru@gmail.com>
2025-12-18 13:43:45 -08:00
John Hawthorn
63b082cf0e Store ractor_id directly on EC
This is easier to access as ec->ractor_id instead of pointer-chasing through
ec->thread->ractor->ractor_id

Co-authored-by: Luke Gruber <luke.gru@gmail.com>
2025-12-18 13:43:45 -08:00
Luke Gruber
aace29d485
Check for NULL fields in TYPEDDATA memsize functions (#15633)
Some TYPEDDATA objects allocate struct fields using the GC right after
they get created, and in that case the VM can try to perform a GC and join
a barrier if another ractor started one. If we're dumping the heap in another
ractor, this acquires a barrier and it will call the `rb_obj_memsize` function on this
object. We can't assume these struct fields are non-null. This also goes for C extensions,
which may cause problems with heap dumping from a ractor if their memsize functions aren't
coded correctly to check for NULL fields. Because dumping the heap from a ractor is likely a
rare scenario and it has only recently been introduced, we'll have to see how this works in
practice and if it causes bugs.
2025-12-18 15:42:49 -05:00
Luke Gruber
a7eb1879ad
[DOC] small improvements to ractor class docs (#15584)
* Ractor.yield no longer exists
* Ractor.shareable_proc returns a copy of the given proc
* Improve wording for monitoring/unmonitoring ports
2025-12-18 15:08:36 -05:00
Jean Boussier
fb1dd92d30 thread_sync.c: rename mutex_trylock internal function
[Bug #21793]

To fix a naming conflict on solaris.
2025-12-18 21:07:55 +01:00
Jean Boussier
8cf4f373ff thread_sync.c: declare queue_data_type as parent of szqueue_data_type.
Allows to remove some duplicated code like szqueue_length, etc.
2025-12-18 20:57:05 +01:00
Jean Boussier
bbc684d830 thread_sync.c: simplify check_array
If the queue was allocated without calling initialize,
`ary` will be `0`.
2025-12-18 20:57:05 +01:00
Jean Boussier
57c4cd9a47 thread_sync.c: eliminate GET_EC() from queue_do_pop
We receive the ec as argument, it's much cheaper to pass it
around that to look it up again.
2025-12-18 20:57:05 +01:00
John Hawthorn
28c2a5b2a4 Fix env debug assertion failure w/ Ractors+JITs
Previously when using a JIT and Ractors at the same time with debug
assertions turned on this could rarely fail with:

    vm_core.h:1448: Assertion Failed: VM_ENV_FLAGS:FIXNUM_P(flags)

When using Ractors, any time the VM lock is acquired, that may join a
barrier as another Ractor initiates GC. This could be made to happen
reliably by replacing the invalidation with a call to rb_gc().

This assertion failure happens because

    VM_STACK_ENV_WRITE(ep, 0, (VALUE)env);

Is setting VM_ENV_DATA_INDEX_FLAGS to the environment, which is not a
valid set of flags (it should be a fixnum). Although we update cfp->ep,
rb_execution_context_mark will also mark the PREV_EP, and until the
recursive calls to vm_make_env_each all finish the "next" ep may still
be pointing to the stack env we've just escaped.

I'm not completely sure why we need to store this on the stack - why is
setting cfp->ep not enough? I'm also not sure why
rb_execution_context_mark needs to mark the prev_ep.
2025-12-18 11:03:23 -08:00
Luke Gruber
74bfb1606d
Remove assertion in encoded_iseq_trace_instrument (#15616)
`encoded_iseq_trace_instrument` is safe to call in a ractor if the iseq
is new. In that case, the VM lock is not taken. This assertion was added in
4fb537b1ee28bb37dbe551ac65c279d436c756bc.
2025-12-18 13:51:33 -05:00
Jean Boussier
0e719239c2 thread_sync: Mutex keep rb_thread_t * instead of VALUE
We never need the actual thread object and this avoid any issue
if the thread object is ever moved.
2025-12-18 19:37:14 +01:00
Luke Gruber
bfd28d581c
make rb_singleton_class ractor safe (#15591)
Since singleton classes are created lazily, we need to make sure that
we lock around their creation.  Unfortunately, that means we need to
lock around every shareable object's call to `singleton_class`,
including classes and modules.
2025-12-18 12:37:27 -05:00
Stan Lo
f133ebb2db
Bump RDoc to 7.0.1 (#15628)
This improves several enhancements to the Aliki theme. And since Aliki
also became the default theme, we don't need to specify the generator name
anymore.
2025-12-18 16:12:47 +00:00
git
9f266ae674 Update default gems list at 0e85881e0cded6ec82ef105b5ff2d0 [ci skip] 2025-12-18 07:47:43 +00:00
Hiroshi SHIBATA
0e85881e0c [ruby/delegate] v0.6.1
https://github.com/ruby/delegate/commit/90ffceb6d6
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
0006591407 Reapply "Merge pull request #52 from ruby/revert-49"
This reverts commit 02e4b58b615d0dd83a6af5cd7c2b8861724011ee.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
2fcad967aa Revert "Allow use of DelegateClass in ractor"
This reverts commit 6e0f2b31f0f4a2a942f3c1daad1bb64852fe6815.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
1e69d688e5 [ruby/delegate] v0.6.0
https://github.com/ruby/delegate/commit/aef34e8c8b
2025-12-18 16:46:29 +09:00
Luke Gruber
e6ca8908c1 Allow use of DelegateClass in ractor
Use `eval` instead of `define_method` when defining delegate methods for
`DelegateClass`.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
a21fe2adfe [ruby/delegate] Reapply "Merge pull request #46 from byroot/use-forward-send"
This reverts commit https://github.com/ruby/delegate/commit/fc2bd0498af0.

https://github.com/ruby/delegate/commit/7d5c1e0842

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
bdf99bf0dc [ruby/delegate] v0.5.0
https://github.com/ruby/delegate/commit/fa35b20eca
2025-12-18 16:46:29 +09:00
Luke Gruber
01e9f95cc3 [ruby/delegate] Allow use of DelegateClass in ractors
Tempfile uses DelegateClass and Tempfile should be able to be used
by different ractors.

https://github.com/ruby/delegate/commit/cad194260b
2025-12-18 16:46:29 +09:00
Nobuyoshi Nakada
85ff21c9e5 RBOOL is unnecessary in C boolean context
Fix a `-Wint-in-bool-context` warning.

```
proc.c:688:33: warning: '?:' using integer constants in boolean context [-Wint-in-bool-context]
  688 |     if (RBOOL(get_local_variable_ptr(&env, idItImplicit, FALSE))) {
```
2025-12-18 16:42:20 +09:00
dependabot[bot]
74b18b5382 Bump github.com/microsoft/vcpkg from master to 2025.12.12
Bumps [github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) from master to 2025.12.12. This release includes the previously tagged commit.
- [Release notes](https://github.com/microsoft/vcpkg/releases)
- [Commits](74e6536215...84bab45d41)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-18 16:39:01 +09:00
Étienne Barrié
769c6a1c54 [DOC] Use Arrays in examples for Array#find 2025-12-17 21:22:39 -08:00
Nobuyoshi Nakada
b816f7bac5
[DOC] Fix documents of rb_intern_str and so on
* `rb_intern_str`: the argument must be `T_STRING`, no conversion.

* `rb_intern_str`, `rb_check_id`, `rb_to_id`, `rb_check_symbol`: raise
  `EncodingError` unless the "name" argument is a valid string in its
  encoding.
2025-12-18 11:27:05 +09:00
Nobuyoshi Nakada
f2d2a757d1
[DOC] Re-fill the paragraph 2025-12-18 10:14:40 +09:00
Augustin Gottlieb
cfa3e7cf75
[DOC] Fix double-word typos in comments
Found via `grep` for repeated words.

* set.c: Fix "or or"
* include/ruby/internal/symbol.h: Fix "is is"
* include/ruby/internal/ctype.h: Fix "in in"
v4.0.0-preview3
2025-12-18 09:34:32 +09:00
Alan Wu
656de67d5c JITs: Pass down GNU make jobserver resources when appropriate
To fix warnings from rustc on e.g. Make 4.3, which is in Ubuntu 24.04:

> warning: failed to connect to jobserver from environment variable
2025-12-17 14:49:32 -05:00
Victor Shepelev
ef3ac3e68c
Adjust Set documentation (#15547) 2025-12-17 21:22:55 +02:00
Luke Gruber
839410f073 Fix heap dump with ractor barrier
When a ractor was being initialized and it would join the heap dump barrier when
allocating its queue or its ports, the heap dump code calls `rb_obj_memsize` on
the ractor and this function assumed `ports` was never NULL. We need to check for
the NULL case in case the ractor is still being initialized. Hopefully other T_DATA
objects don't suffer from the same issue, otherwise we could revert the ractor barrier
during heap dump or not use `rb_obj_memsize` on T_DATA during the heap dump.
2025-12-17 11:12:57 -08:00
Luke Gruber
601ac78caf
[DOC] Small changes to docs for ObjectSpace#each_object (#15564)
Change example to use user-defined class instead of `Numeric`.
2025-12-17 14:00:58 -05:00