Ruby
Ruby 3.1 adds Class#descendants
With Ruby 3.1, we can use `Class#descendants` to yield the classes that have been directly or indirectly derived from a specific class.Ruby 3.1 MatchData#match Methods
Ruby 3.1 MatchData#match returns the substring corresponding to the argument, while MatchData#match_length returns the length of the captured substring.Ruby 3.1 Adds Hash Value Omission
Ruby 3.1 adds the ability to use hash literals without having a value.Ruby 3.1 Adds Integer.try_convert
Ruby 3.1 adds try_convert for Integer to convert objects via implicit to_int method, returning nil if undefined.Ruby 3.1 Pin Operator for Pattern Matching Explained
Ruby 3.1 extends the pin operator (^) to support expressions and ranges in pattern matching. Learn variable pinning with examples.Ruby 3.1 Adds Enumerable#compact
Ruby 3.1 adds Enumerable#compact and Enumerator::Lazy#compact to return a copy of `self` with all `nil` elements removed.Ruby 3.1 Enumerable#tally Accepts Hash
Ruby 3.1 extends Enumerable#tally to accept an optional hash for accumulating counts across collections.Ruby 3.1 adds Array#intersect? method
Ruby Array#intersect? method will return true or false based on common elements present in the two arrays.Ruby 3.1 Left-to-Right Assignment Order
Ruby changes the evaluation order for multiple assignments from left to right making it consistent with single assignment evaluation order.Ruby 3.0 adds `Hash#except` and `ENV.except`
Ruby 3.0 adds `Hash#except` to return a new hash that includes everything from the original hash except the given keys. `ENV` also gets support for `except`.