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

Refinements are activated lexically by using. What happens when you call grab?

module Ext refine Array do def second; self[1]; end end end class Container def initialize(arr); @arr = arr; end def grab; @arr.second; end end using Ext Container.new([1, 2, 3]).grab