[Ruby 3.3] Add more tests for Regexp.linear_time?#1344
Conversation
> The cache-based optimization now supports lookarounds and atomic groupings. That is, match for Regexp containing these extensions can now also be performed in linear time to the length of the input string. However, these cannot contain captures and cannot be nested. [Feature #19725]
No, because Ruby implementations should always be allowed to optimize more. There is |
|
These changes look good but I want to test them on TruffleRuby too and add explicit guards for cases where it differs. IOW I don't want Ruby implementations to be forced to use the slower cache-based optimization to pass this spec. |
…nly pass on some Regexp engines
As #1223 was merged, let's do more of them.
From #1216
Should negative cases be included? Not sure. Also, regexp with a capture group in a positive lookbehind is surprisingly linear.