Ruby 3.2 preview 1 with support for WASM compilation
Timeouts for Regexp is quite interesting.  The engineering purity in me saddens at such a thought, but indeed it seems highly practical.<p>The syntax feels a little rough although I have no ideas how to make it better:<p><pre><code>    Regexp.timeout = 1.0
    ...
    /^a*b?a*$/ =~ "a" * 50000 + "x"
</code></pre>
I think I would favor the:<p><pre><code>    long_time_re = Regexp.new("^a*b?a*$", timeout: 1.0)
</code></pre>
version instead but I use the `=~` almost entirely, so that would still be a big style change.  Probably end up setting a global timeout per app and then overriding for individual checks as needed?