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

Given chained module inclusion where one module includes another and overrides a method with `super`, what is the linearized ancestor order and resulting output?

module Walk; def move; "walk"; end; end module Run include Walk def move; "run->#{super}"; end end class Person; include Run; end p Person.ancestors p Person.new.move