Programming Ruby 3.2 (5th Edition): B1.0 page 126, === used for case target

@noelrappin

Page 126, Ranges as Intervals, paragraph 3 :

The triple equal version is often used in case statements:

I thought it was a mistake, that you wanted to say “The triple dot version of the range”, because all when clauses use the ... exclusive range. But you speak about the case equality operator used in the case target form of case. To make it more understandable, I would rephrase it like so :

The case equality operator === is also used to compare the condition in the when clause with the target of the case, car_age in the following example: