Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyComparable and spaceshipSingle-choice MCQ

How does Array#<=> decide the result for arrays of different lengths when the shorter one matches the prefix of the longer one?

p([1, 2] <=> [1, 2, 3])