Ruby: Comparisons, ==, ===

=== is the case-equal operator

Comparing numbers

pry> items = 1
pry> items === 1
=> true
pry> items === 2
=> false

Comparing ranges

A range is case-equal with a number if the range includes a number:

pry> (1..10) === 4
=> true
pry> (1..10) === 4
=> false

Comparing regular expressions

A regular expression is case-equal with a string if it matches the string

pry> /rub/ === "ruby"
=> true
pry> /rub/ === "rby"
=> false