-
Jean Boussier authored
Backport of https://github.com/rails/rails/pull/43821 If the SQL encoding somehow is invalid, `Regexp#match?` raises `ArgumentError`. Best we can do is to copy the string and try to match the regexp in "binary" mode. Hopefully these cases are rare enough that the string copy should be an important overhead.
Jean Boussier authoredBackport of https://github.com/rails/rails/pull/43821 If the SQL encoding somehow is invalid, `Regexp#match?` raises `ArgumentError`. Best we can do is to copy the string and try to match the regexp in "binary" mode. Hopefully these cases are rare enough that the string copy should be an important overhead.
Loading