Ruby’s case statement uses ===
I’ve not found this stated clearly enough elsewhere so I’m doing so myself. Ruby’s case statement calls the === method on the argument to each of the when statements Some explanation and examples (and quirks) in my blog post about it here.
Post a comment