95163 Commits

Author SHA1 Message Date
Yasuo Honda
ca2fffd3a7 [ruby/openssl] Replace Ruby 3.5 with Ruby 4.0
This commit updates the Ruby version in the error message to follow the commit in Ruby master branch.
6d81969b47

https://github.com/ruby/openssl/commit/5a50a4d793
2025-11-11 13:08:02 +00:00
nagachika
48dce7874f simplify RSRING_GETMEM() definition. 2025-11-11 18:57:30 +09:00
nagachika
367ddd445c include/ruby/internal/core/rstring.h: Remove rbimpl_rstring_getmem() definition. 2025-11-11 18:57:30 +09:00
nagachika
9d44cb0b2b Remove rbimpl_rstring_getmem() usage as workaround for GCC 15.2.1 optimization bug. [Bug #21655] 2025-11-11 18:57:30 +09:00
Nobuyoshi Nakada
c5bd4acd30 [Bug #21666] Get rid of use of unspecified values 2025-11-11 16:23:33 +09:00
Hiroshi SHIBATA
66ecd00c19 Support out-of-place build in ruby/ruby repo 2025-11-11 16:11:05 +09:00
git
c8977e9064 Update bundled gems list as of 2025-11-11 2025-11-11 06:53:52 +00:00
Randy Stauner
ddaa56d549
Fix bootstraptest runner driver message (#15072)
This was a mistake;
the code tested for RUBY_PATCHLEVEL but then
instead of using it used RUBY_PLATFORM twice.
2025-11-10 21:41:35 -08:00
Hiroshi SHIBATA
c477f59e3a [ruby/rubygems] Use Spec::Path.relative_gemspec
https://github.com/ruby/rubygems/commit/2142e405b0
2025-11-11 04:57:12 +00:00
Aaron Patterson
d3138912b8 [ruby/rubygems] build gems directly instead of shelling out
I'm trying to speed up the bundler tests. The tests shell out a lot in
order to build gems. We can build gems without creating a sub-process.
This change reduced the test suite time from ~24 minutes, to about ~21
minutes on my machine.  Once we have more of these "asset generation"
routines done in the same process, I think we can start caching the
outputs for further improvements

https://github.com/ruby/rubygems/commit/ebf27056c6
2025-11-11 04:57:12 +00:00
Randy Stauner
71fecfa205
ZJIT: Rename things so that they aren't named "not_optimized_optimized" (#15135)
These refer to "OptimizedMethodType" which is a subcategory of "MethodType::Optimized"
so name them after the latter to avoid "not_optimized_optimized".
2025-11-10 20:10:10 -08:00
Takashi Kokubun
d9f0b5a5f9
ZJIT: Set cfp->sp on leaf calls with GC (#15137)
Co-authored-by: Randy Stauner <randy@r4s6.net>
2025-11-10 20:07:35 -08:00
Alan Wu
6e6f5d3c32 Add test for [Bug #21265]
The crash was fixed by a4dff09be79b52288a47658964d25e5aa84fc960 ("Fix
resolving refined module-defined method"). I had a patch for this around
for a few months but never merged it. Oops!
2025-11-10 22:46:11 -05:00
Alan Wu
fafecb43c5 Fix printf specificer. %lp doesn't make sense. Triggered -Wformat 2025-11-10 22:21:10 -05:00
Luke Gruber
148fde2754
Revert "ns_subclasses refcount accesses need to be atomic (#15083)" (#15138)
This reverts commit 2998c8d6b99ec49925ebea42198b29c3e27b34a7.

We need to find a better way to fix this bug. Even with this refcount
change, errors were still being seen in CI. For now we need to remove
this failing test.
2025-11-11 02:52:43 +00:00
Luke Gruber
16c6f36039
[DOC] Clarify Thread#kill documentation. (#15132)
Mention that it is asynchronous and that the killed thread can still run
a small amount of ruby code before exiting.
2025-11-10 20:33:07 -05:00
Luke Gruber
d2c30a3bae
Fix thread_sched_wait_events race (#15067)
This race condition was found when calling `Thread#join` with a timeout
inside a ractor. The race is between the polling thread waking up the
thread and the `ubf` getting called (`ubf_event_waiting`). The error was
that the ubf or polling thread would set the thread as ready, but then
the other function would do the same.

Fixes [Bug #21614]
2025-11-10 20:32:30 -05:00
Stan Lo
222d8990d4 ZJIT: Reduce duplication between profiled_type_of_at and resolve_receiver_type 2025-11-11 09:47:40 +09:00
Stan Lo
327f070acd ZJIT: Don't need to store class in profiled type resolution enums 2025-11-11 09:47:40 +09:00
Peter Zhu
87493e32ed Fix memory leak in ObjectSpace tracing
allocation_info_tracer_compact_update_object_table_i deletes entries where
the key is no longer in the GC heap but did not free the allocation_info
causing the memory to be leaked.
2025-11-10 16:34:00 -08:00
Takashi Kokubun
d268a55186
ZJIT: Split unhandled_hir_insn and unknown_newarray_send stats (#15127) 2025-11-10 16:29:50 -08:00
John Hawthorn
6238b6f53e Remove unused subclass methods 2025-11-10 15:55:38 -08:00
Randy Stauner
f95aa5b2a9
ZJIT: Rename not_optimized_instruction to uncategorized_instruction (#15130)
Make it more obvious that this hasn't been handled and could be
broken down more.
2025-11-10 23:16:31 +00:00
Peter Zhu
c7f0a9c4cd Fix memory leak in subclasses when freeing classext
We don't decrement the super and module subclasses count for iclasses that
are having their classext replaced. This causes the reference count to be
incorrect and leak memory.

The following script demonstrates the memory leak:

    module Foo
      refine(Object) do
        define_method(:<=) {}
      end
    end

    class Bar
      include Comparable
    end

With RUBY_FREE_AT_EXIT and ASAN, we can see many memory leaks, including:

    Direct leak of 16 byte(s) in 1 object(s) allocated from:
        #0 0x599f715adca2 in calloc (miniruby+0x64ca2)
        #1 0x599f716bd779 in calloc1 gc/default/default.c:1495:12
        #2 0x599f716d1370 in rb_gc_impl_calloc gc/default/default.c:8216:5
        #3 0x599f716b8ab1 in ruby_xcalloc_body gc.c:5221:12
        #4 0x599f716b269c in ruby_xcalloc gc.c:5215:34
        #5 0x599f715eab23 in class_alloc0 class.c:790:22
        #6 0x599f715e4bec in class_alloc class.c:836:12
        #7 0x599f715e60c9 in module_new class.c:1693:17
        #8 0x599f715e60a2 in rb_module_new class.c:1701:12
        #9 0x599f715e6303 in rb_define_module class.c:1733:14
        #10 0x599f715ebc5f in Init_Comparable compar.c:315:22
        #11 0x599f716e35f5 in rb_call_inits inits.c:32:5
        #12 0x599f7169cbfd in ruby_setup eval.c:88:9
        #13 0x599f7169cdac in ruby_init eval.c💯17
        #14 0x599f715b0fa9 in rb_main main.c:41:5
        #15 0x599f715b0f59 in main main.c:62:12
        #16 0x739b2f02a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
        #17 0x739b2f02a28a in __libc_start_main csu/../csu/libc-start.c:360:3
        #18 0x599f7157c424 in _start (miniruby+0x33424)
2025-11-10 15:07:02 -08:00
Takashi Kokubun
f054131288
ZJIT: Add patch_point_count stat (#15100) 2025-11-10 13:47:56 -08:00
Randy Stauner
3ddb5f99a9 Allow --jit to mean zjit if yjit isn't defined
The --help output suggests this should work
as ZJIT is labeled as the default if YJIT isn't enabled.
2025-11-10 13:14:13 -08:00
Randy Stauner
7b1e0a6096 ZJIT: Define jit_compile_exception for ZJIT even without YJIT
Seems like an oversight
2025-11-10 13:14:13 -08:00
Max Bernstein
03a9d075cd ZJIT: Fix land race 2025-11-10 11:26:55 -05:00
Max Bernstein
fb5f10e0d6
ZJIT: Snapshot once per YARV insn (#15082)
This is roughly net-neutral for the number of instructions created but
at least cenetralizes where the Snapshot is made.

Previously, we might have multiple Snapshot per YARV instruction
depending on if it had event flags, if the body of the instruction also
needed a Snapshot, etc.
2025-11-10 15:51:56 +00:00
Takashi Kokubun
b539cd2a33
ZJIT: Deduplicate side exits (#15105) 2025-11-10 07:30:17 -08:00
Nobuyoshi Nakada
557eec792e
[DOC] Update missing docs 2025-11-10 19:12:35 +09:00
Nobuyoshi Nakada
286a8eee82
Move grouping by upstreams to SyncDefaultGems::Repository
It is also useful to distribution changes to each upstream repository.
2025-11-10 19:12:34 +09:00
Nobuyoshi Nakada
9720d499ff [ruby/zlib] [DOC] Missing documents
https://github.com/ruby/zlib/commit/25355bc1dc
2025-11-10 10:12:10 +00:00
Nobuyoshi Nakada
df9b8fdb16 [ruby/yaml] [DOC] Missing documents
https://github.com/ruby/yaml/commit/388cd27291
2025-11-10 10:03:07 +00:00
Nobuyoshi Nakada
d2044ce017 [ruby/weakref] [DOC] Missing documents
https://github.com/ruby/weakref/commit/cccde64080
2025-11-10 10:01:39 +00:00
Nobuyoshi Nakada
ae0dd72b96 [ruby/tempfile] [DOC] Suppress documentation for internals
https://github.com/ruby/tempfile/commit/475d719e4d
2025-11-10 10:00:00 +00:00
Nobuyoshi Nakada
95c4ca62a8 [ruby/singleton] [DOC] Missing documentation
Suppress documentation for internals

https://github.com/ruby/singleton/commit/4ac0cc497d
2025-11-10 09:59:40 +00:00
Hiroshi SHIBATA
f4b18c5d00 [ruby/rubygems] Hide patchlevel from lockfile
https://github.com/ruby/rubygems/commit/9b169c700f
2025-11-10 09:54:41 +00:00
Nobuyoshi Nakada
87f8632765 [ruby/prettyprint] [DOC] Missing documents
https://github.com/ruby/prettyprint/commit/3a43a4bbf6
2025-11-10 09:51:11 +00:00
Nobuyoshi Nakada
caf40a3996 [ruby/pp] [DOC] Suppress documentation for internals
https://github.com/ruby/pp/commit/e1f39cb39c
2025-11-10 09:49:36 +00:00
Nobuyoshi Nakada
54b5f83aca [ruby/open3] [DOC] Missing documents
https://github.com/ruby/open3/commit/e6d09a6aa8
2025-11-10 09:43:50 +00:00
Nobuyoshi Nakada
98f9211dc3 [ruby/open-uri] [DOC] Missing documents
https://github.com/ruby/open-uri/commit/1ccc576e9a
2025-11-10 09:32:57 +00:00
Nobuyoshi Nakada
0dfca2e3c3 [ruby/forwardable] [DOC] Missing documents
https://github.com/ruby/forwardable/commit/909986fee9
2025-11-10 09:28:06 +00:00
Nobuyoshi Nakada
daf8c2fa13 [ruby/find] [DOC] Missing documents
https://github.com/ruby/find/commit/01232ad51a
2025-11-10 09:25:45 +00:00
Nobuyoshi Nakada
ea647f52c9 [ruby/erb] [DOC] Suppress documentation for internals
https://github.com/ruby/erb/commit/332e200060
2025-11-10 09:15:48 +00:00
Nobuyoshi Nakada
309b6ca1c2 [ruby/delegate] [DOC] Update missing docs and mark ups
https://github.com/ruby/delegate/commit/020a6cfe4b
2025-11-10 09:05:28 +00:00
Nobuyoshi Nakada
2af63204de [ruby/digest] [DOC] Missing documents
https://github.com/ruby/digest/commit/16b598d6f2
2025-11-10 08:38:45 +00:00
Olle Jonsson
bc177ff1ce [ruby/timeout] Suppress warnings in two tests
Failed build in #70.

Pre-3.0 versions of Ruby didn't support pattern matching, and power_assert warned.

https://github.com/ruby/timeout/commit/983cbf636a
2025-11-10 08:31:11 +00:00
Aaron Patterson
57daafc1da [ruby/rubygems] Make verification methods private
I would like to start making some of the methods in Gem::Package
private so that we can refactor them better.  Right now we have many
methods that are public, and since they are public we can't refactor
them.  Historically, I think "private" methods have just been tagged
with :nodoc:, but I would like to be more strict about our APIs

https://github.com/ruby/rubygems/commit/fb352e9176
2025-11-10 08:24:04 +00:00
Nobuyoshi Nakada
57f2ac720d [ruby/rubygems] [DOC] Fix markups
Use `<tt>` instead of `+` that cannot enclose punctuations.

https://github.com/ruby/rubygems/commit/f84035c0b6
2025-11-10 06:44:27 +00:00