>> cards = cards.sort_by { rand }

How does this work??
I thought the code block should yield either -1, 0 or +1, but rand
yields a number between 0 and 1. Or am I mistaken?

Best regards,
Francis