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

After re-opening `C1` to include modules in stages, what is the ancestor order and the result of `hello`?

module M1; def hello; "m1"; end; end class C1; end module M2; def hello; "m2 " + super; end; end class C1; include M1; end class C1; include M2; end p C1.ancestors.first(4) p C1.new.hello