Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyinclude prepend extend on the chainSingle-choice MCQ

Given this class, what does `C.new.greet` return, and why does the chain resolve this way?

module A def greet; "A->" + super; end end module B def greet; "B->" + super; end end class Base def greet; "Base"; end end class C < Base prepend A include B def greet; "C->" + super; end end puts C.new.greet