Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubytap and thenSingle-choice MCQ

What does this code print, given that tap returns its receiver regardless of the block's value?

result = [1, 2, 3].tap { |a| a.map! { |x| x * 2 }; 999 } p result