Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyrefinements usingSingle-choice MCQ

A class activates a refinement with `using`. Does calling the refined method through `Object#send` (dynamic dispatch) still work?

module Shout refine String do def loud; upcase + "!"; end end end class Greeter using Shout def call(s); s.loud; end def call_send(s); s.send(:loud); end end Greeter.new.call("hi") Greeter.new.call_send("hi")