Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubypattern matching case inSingle-choice MCQ

How does the pin operator `^` behave here?

expected = 5 case [5, 10] in [^expected, y] puts "matched y=#{y}" else puts "no match" end