Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyprepend vs includeSingle-choice MCQ

An anonymous module is prepended to wrap an existing method. What does `Calc.new.add(2, 3)` return?

class Calc def add(a, b); a + b; end prepend(Module.new do def add(a, b); super * 10; end end) end Calc.new.add(2, 3)