mudge / re2

Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
http://mudge.name/re2/
BSD 3-Clause "New" or "Revised" License
129 stars 13 forks source link

Pattern matching support for RE2::MatchData #57

Closed mudge closed 1 year ago

mudge commented 1 year ago

As per https://github.com/ruby/ruby/pull/6216, add support for pattern matching RE2::MatchData objects by implementing deconstruct and deconstruct_keys.

See https://docs.ruby-lang.org/en/3.0/syntax/pattern_matching_rdoc.html#label-Matching+non-primitive+objects-3A+deconstruct+and+deconstruct_keys

mudge commented 1 year ago

Added in https://github.com/mudge/re2/pull/58