Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubysingleton eigenclassSingle-choice MCQ

After `o.extend(Greeter)`, where does the module sit in the object's lookup, and is the object's singleton class shared with other instances?

module Greeter; def hi; "hi"; end; end o = Object.new o.extend(Greeter) p o.singleton_class.ancestors.first(2) p o.singleton_class.equal?(Object.new.singleton_class)