News for hackers. Stuff that matters.
Re:Pattern Matching in Ruby 2.7 (2019) by barrkel on Thursday January 09, 2020 @06:39AM (#22000343)
The === operator is used by case statements, and can be used to implement pattern matching if you write objects which match in the way you want. It's how regexes match strings and ranges match numbers, etc.

What it doesn't have is destructuring combined with pattern matching, though it does have some destructuring assignments.

There are no comments on this comment yet.