From: "adamblackwell (Adam Blackwell) via ruby-core" Date: 2026-11-21T01:03:06+00:00 Subject: [ruby-core:127652] [Ruby Bug#22615] Backport 1d214cd778 to ruby_3_4 Issue #22615 has been reported by adamblackwell (Adam Blackwell). ---------------------------------------- Bug #22615: Backport 1d214cd778 to ruby_3_4 https://bugs.ruby-lang.org/issues/22615 * Author: adamblackwell (Adam Blackwell) * Status: Open * ruby -v: ruby 3.4.13 (2026-11-19 revision 48857d6f2e) +PRISM [arm64-darwin25] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Please backport 1d214cd7786e916cd5b198eb58436a5e10b45cc3 (the fix for Bug #22475) to ruby_3_4. Bug #22475 lists 3.4.11 and 3.4.12 as affected. It still reproduces on 3.4.13, the release from 2026-11-18 that includes the security fixes: ``` m = Module.new c = Class.new { include m } a = Module.new; b = Module.new m.prepend a m.prepend b c.ancestors.count(b) # => 2 on 3.4.13, 1 on 3.4.9 ``` Why the backport is needed: 3.4.13 is the only 3.4 release with the 2026-11-18 security fixes, so anyone taking it also takes this regression. I am affected by it. When the doubled module's method is wrapped by a library that calls the original through bind_call, such as sorbet-runtime, the duplicate becomes infinite recursion and SystemStackError. Note: the commit does not apply cleanly to ruby_3_4, because the loop in rb_prepend_module differs there from master. Related: Bug #22475, Bug #22257, https://github.com/ruby/ruby/pull/19552 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/