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

A refinement adds `Hash#deep_dup` and is activated with `using` inside module `Service`. A separate mixin module `Mixin` (defined without `using`) calls `h.deep_dup`. What happens when a class that includes `Mixin` calls it?

module Ext refine Hash do def deep_dup; "deep"; end end end module Mixin def use_it(h); h.deep_dup; end end class Consumer include Mixin end Consumer.new.use_it({})