Hiroshi SHIBATA 2026-08-27 10:31:32 +0000 (Thu, 27 Aug 2026)
New Revision: fdd520806d
https://github.com/ruby/ruby/commit/fdd520806d
Log:
Fix prepend ancestry order in user boxes
ensure_origin read the m_tbl before the first write created the box-local classext, so the origin ICLASS captured the prime m_tbl while the subclass ICLASSes referred the box-local copy made by the CoW. rb_prepend_module then missed the shared m_tbl check and inserted the prepended module after the target module instead of before it.
Co-Authored-By: Claude Fable 5 <
nor...@anthropic.com>
Modified files:
class.c
test/ruby/test_box.rb