20 Nov
2026
20 Nov
'26
10:53 p.m.
Issue #22612 has been reported by alanwu (Alan Wu). ---------------------------------------- Bug #22612: False sharing of prepended singleton methods when singleton class is cloned https://bugs.ruby-lang.org/issues/22612 * Author: alanwu (Alan Wu) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ```ruby class Foo def bar = :from_class end mod = Module.new { def bar = [:mod, super] } o = Foo.new o.singleton_class.prepend(mod) clone = o.clone def o.bar = :original_only p clone.bar # => [:mod, :original_only], should be [:mod, :from_class] def clone.bar = :clone_only p clone.bar # => :clone_only, should be [:mod, :clone_only] ``` -- https://bugs.ruby-lang.org/