Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubymethod lookup and ancestorsSingle-choice MCQ

If you reopen an already-instantiated class and prepend a module, what happens to objects created before the prepend?

class C; def greet; "plain"; end; end o = C.new module P; def greet; "wrapped:" + super; end; end class C; prepend P; end p o.greet