Actions
Bug #22612
openFalse sharing of prepended singleton methods when singleton class is cloned
Bug #22612:
False sharing of prepended singleton methods when singleton class is cloned
Description
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]
Updated by alanwu (Alan Wu) about 15 hours ago
- Description updated (diff)
Actions