From: "alanwu (Alan Wu) via ruby-core" Date: 2026-11-20T22:53:16+00:00 Subject: [ruby-core:127645] [Ruby Bug#22612] False sharing of prepended singleton methods when singleton class is cloned 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/ ______________________________________________ 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/