Ruby 3.1 adds try_convert method to Integer class for implicit conversions

try_convert for Integer will convert the object into an instance of the class via the implicit conversion method to_int and returns nil if no implicit conversion method is defined.

Ruby 3.1 introduces pattern matching pin operator against expression

Ruby 3.1 adds support for the expression and range when using the pattern matching pin operator.