Commit graph

92133 commits

Author SHA1 Message Date
Nobuyoshi Nakada
3ca007d82e
Ignore miss-and-revised commits [ci skip] 2025-06-07 19:58:24 +09:00
Nobuyoshi Nakada
7a56c31641
Revert "[Bug #21388] Make snapshots of gems"
This reverts commit e90282be7b, a commit miss.
2025-06-07 18:43:56 +09:00
Nobuyoshi Nakada
e90282be7b
[Bug #21388] Make snapshots of gems
If the revision of bundled gems is specified for ruby master (and
`git` is usable), checkout that revision and build a snapshot gem, and
use it for `test-spec` instead of the downloaded release version.
2025-06-07 18:41:36 +09:00
Nobuyoshi Nakada
c45e4da71b
Make the installation target overridable
There are various targets such as `install-bin`, `install-ext`, etc.,
but since then, the number of installation types has increased too
much to add all the targets.
2025-06-07 18:41:36 +09:00
Satoshi Tagomori
dd4e39a115 Delete useless Namespace#current_details
The implementation of Namespace#current_details shows warning about
use of snprintf directive arguments (only in gcc environments?).
This method will be useless when the current namespace management
will be updated.
2025-06-07 18:19:59 +09:00
Nobuyoshi Nakada
20cf46039a
Fix messages for skipped bundled gems 2025-06-07 16:28:05 +09:00
Koichi Sasada
1605704117 ignore confirming belonging while finrializer
A finalizer registerred in Ractor A can be invoked in B.

```ruby
require "tempfile"
r = Ractor.new{
  10_000.times{|i|
    Tempfile.new(["file_to_require_from_ractor#{i}", ".rb"])
  }
}
sleep 0.1
```

For example, above script makes tempfiles which have finalizers
on Ractor r, but at the end of the process, main Ractor will invoke
finalizers and it violates belonging check. This patch just ignore
the belonging check to avoid CI failure.

Of course it violates Ractor's isolation and wrong workaround.
This issue will be solved with Ractor local GC.
2025-06-07 09:52:03 +09:00
Jean Boussier
90ba2f4e1c Add missing lock around redblack_cache_ancestors
This used to be protected because all shape code was
under a lock, but now that the shape tree is lock-free
we still need to lock around the red-black cache.

Co-Authored-By: Luke Gruber <luke.gruber@shopify.com>
2025-06-06 23:07:22 +02:00
Peter Zhu
347e581a4c Introduce MODULAR_GC_FN
MODULAR_GC_FN allows functions in gc.c to be defined as static when not
building with modular GC.
2025-06-06 10:46:55 -04:00
Alan Wu
94ba62c790 ZJIT: Fix build error from commit race 2025-06-06 23:14:51 +09:00
Alan Wu
677c36370f ZJIT: Fix insn arg index for defined, add tests 2025-06-06 22:30:17 +09:00
Alan Wu
657b2f064b ZJIT: Parse definedivar into HIR 2025-06-06 22:30:17 +09:00
Alan Wu
cd7c5a3484 ZJIT: Take a slice instead of Vec in test code
Shorter code and more efficient.
2025-06-06 22:30:17 +09:00
Jean Boussier
2b810ac595 shape.c: match capacity growth with T_OBJECT embedded sizes
This helps with getting with of `SHAPE_T_OBJECT`, by ensuring
that transitions will have capacities that match the next embed size.
2025-06-06 13:37:03 +02:00
Samuel Williams
dde9fca63b Be more specific with RUBY_VM_INTERRUPTED in debug assertions. 2025-06-06 20:29:04 +09:00
Jean Boussier
3883c38979 shape.c: Fix improperly named routine
Meant to be `transition_complex` not `transition_frozen`.
2025-06-06 11:43:51 +02:00
Jean Boussier
0cc41d3d39 proc.c: saves Binding#clone on copying ivars twice 2025-06-06 11:30:23 +02:00
Samuel Williams
5ac435dc34 Log ec->interrupt_flag if non-zero. 2025-06-06 18:15:41 +09:00
Max Bernstein
3246bbd325 ZJIT: Add codegen for uncached setinstancevariable 2025-06-06 16:17:54 +09:00
Max Bernstein
6a46ca31a7 ZJIT: Add codegen for uncached getinstancevariable
I didn't know `rb_ivar_get` existed until @Xrxr pointed me to it.
Thanks, Alan!
2025-06-06 16:17:54 +09:00
Nobuyoshi Nakada
2eb0a1a749
Fix birthtime specs on old Linux 2025-06-06 14:16:37 +09:00
Nobuyoshi Nakada
180214287e CI: Continue without record if Launchable setup failed 2025-06-06 14:03:32 +09:00
Nobuyoshi Nakada
78d2a2308f CI: Split cleanups of Launchable generated files 2025-06-06 14:03:32 +09:00
Koichi Sasada
1baa396e21 fix rp(obj) for any object
Now `rp(obj)` doesn't work if the `obj` is out-of-heap because
of `asan_unpoisoning_object()`, so this patch solves it.

Also add pointer information and type information to show.
2025-06-06 13:44:15 +09:00
Samuel Williams
ead14b19aa Fix blocking_operation_wait use-after-free bug. 2025-06-06 13:13:16 +09:00
Samuel Williams
81a23c5793 rb_io_blocking_operation_exit should not execute with pending interrupts. 2025-06-06 13:13:16 +09:00
git
e093c3145a Update default gems list at 9f00044d0f [ci skip] 2025-06-06 02:38:59 +00:00
Hiroshi SHIBATA
9f00044d0f
Bump up strscan version to 3.1.6.dev 2025-06-06 11:30:14 +09:00
Daniel Colson
deb70925a2 [ruby/strscan] Implement Write Barrier
(https://github.com/ruby/strscan/pull/156)

StringScanner holds the string being scanned, and a regex for methods
like `match?`. Triggering the write barrier for those allows us to mark
this as WB protected.

32fec70407
2025-06-06 11:29:42 +09:00
Hiroshi SHIBATA
1dd8671c46
Sync ruby/openssl
Pick https://github.com/ruby/openssl/pull/896
2025-06-06 11:11:38 +09:00
David Rodríguez
ca1c46d33c [rubygems/rubygems] Ignore local specifications if they have incorrect dependencies
Currently ruby-dev installs an incorrect gemspec for rdoc, that does not
declare its dependency on psych.

This seems like a ruby-core bug, but it seems best for Bundler to ignore
it, go with the remote specification instead, and print a warning.

227cafd657
2025-06-06 10:22:29 +09:00
Samuel Giddins
c0a1e877b3
Move most of Bundler::GemHelpers to Gem::Platform
This will help centralize wheel platform selection logic eventually

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2025-06-06 10:22:18 +09:00
David Rodríguez
6a9af9f0b5
[rubygems/rubygems] Tweak to spec setup so that rspec instead of our bin/rspec binstub still works
24e6699316
2025-06-06 10:09:14 +09:00
David Rodríguez
3ba066e54f
[rubygems/rubygems] Improve more exec specs to avoid swallowing errors
439e9bcf81
2025-06-06 10:09:14 +09:00
David Rodríguez
3b2d068ac2
[rubygems/rubygems] Improve bundle exec with default gems specs
Make them more consistent and not silently pass even if something
regresses. These specs had a typo that made the assertion be that the
`erb --version` output includes the empty string which is always
obviously true.

451e07c305
2025-06-06 10:09:14 +09:00
David Rodríguez
d95f7a3c43
[rubygems/rubygems] Extract stdboth spec helper
bb13f4e702
2025-06-06 10:09:14 +09:00
Thomas Marshall
ee55b82b34
[rubygems/rubygems] Cache commit SHA ref revisions
If the `ref` option is a specific commit SHA, we can check to see if
it's already fetched locally. If it is, then we don't need to re-fetch
it from the remote.

The `ref` option might not be a commit SHA, so we're using the `#commit`
method which returns the full SHA if it's a commit ref, or the locked
revision, or nil.

This is a small improvement that will make `bundle update` slightly
faster in cases for git-sourced gems pinned to a specific commit.

f434c2e66c
2025-06-06 10:09:14 +09:00
Thomas Marshall
6839eadd53
[rubygems/rubygems] Add tests for GitProxy#checkout
This commit adds tests to capture the current behavior of `#checkout`.
They are not exhaustive, but they cover cases cloning and fetching the
repository with different ref types. This will make it easier to change
the caching behavior in a subsequent commit.

f637a412a6
2025-06-06 10:09:14 +09:00
Nobuyoshi Nakada
f1fe26a334
CI: Fix duplicate timeouts 2025-06-06 09:40:52 +09:00
Samuel Williams
f0cf4dce65
Handle spurious wakeups in Thread#join. (#13532) 2025-06-06 09:38:57 +09:00
Nobuyoshi Nakada
e66ac2a743
CI: Fix redirection errors 2025-06-06 09:37:19 +09:00
Luke Gruber
54ef6c312a
[Bug #21400] Fix rb_bug() when killing current root fiber in non-main thread (#13526)
Fixes the following:

```ruby
Thread.new { Fiber.current.kill }.join
```
2025-06-06 09:31:45 +09:00
Nobuyoshi Nakada
86eb5f9c05
CI: Trap launchable_record_test in the parent process 2025-06-06 08:52:02 +09:00
Shannon Skipper
43472a3001
ZJIT: Panic unimplemented for OOB basic block args (#13533) 2025-06-05 16:37:01 -07:00
Nobuyoshi Nakada
5da3dc88d6
CI: Timeout launchable setup in 3min 2025-06-06 08:00:51 +09:00
Nobuyoshi Nakada
296a0d0b7c
CI: Create report files only when Launchable setup succeeded 2025-06-06 08:00:51 +09:00
Koichi Sasada
a62166e28e support nested VM barrier synchronization
on `RGENGC_CHECK_MODE > 1`, there are the following steps

1. gc_enter
2. vm_barrier
3. verify_internal_consistency
4. vm_barrier

and it causes nested vm_barrier synchronization.

This patch allows such cases.
2025-06-06 06:49:08 +09:00
Takashi Kokubun
1a991131a0
ZJIT: Pass self through basic block params (#13529)
* ZJIT: Pass self through basic block params

Co-authored-by: Max Bernstein <tekknolagi@gmail.com>

* Add comments for self

* Use self_param for ivar

* Make self_param a loop local

* Fix rest parameter type check

* Push self_param first

* Add a test case for putself

* Use SELF_PARAM_IDX

Co-authored-by: Max Bernstein <tekknolagi@gmail.com>

* Fix test_unknown

---------

Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
2025-06-05 14:48:04 -07:00
Jean Boussier
4e39580992 Refactor raw accesses to rb_shape_t.capacity 2025-06-05 22:06:15 +02:00
Jeremy Evans
0b07d2a1e3 Deprecate passing arguments to Set#to_set and Enumerable#to_set
Array#to_a, Hash#to_h, Enumerable#to_a, and Enumerable#to_h do not
allow you to specify subclasses.  This has undesired behavior when
passing non-Set subclasses.  All of these are currently allowed, and
none make sense:

```ruby
enum = [1,2,3].to_enum

enum.to_set(Hash)
enum.to_set(Struct.new("A", :a))
enum.to_set(ArgumentError)
enum.to_set(Thread){}
```

Users who want to create instances of a subclass of Set from an
enumerable should pass the enumerable to SetSubclass.new instead of
using to_set.
2025-06-06 01:24:05 +09:00