Add specs for lookarounds in regexp in linear time
This is an attempt at a fix for #1216, but I feel like this is more of an MRI internal property and I'm not sure if this does even belong in the specs. If this should be added, we should probably extend the test cases with the other optimizations. (I used https://github.com/ruby/ruby/pull/7931/files#diff-f12a6f58c06015b85739069cde86a0921a8f12fb9c66e05e6643f6dbcebb1a29 to even find a test case)
From .linear_time?'s description:
Note that this is a property of the ruby interpreter, not of the argument regular expression. Identical regexp can or cannot run in linear time depending on your ruby binary. Neither forward nor backward compatibility is guaranteed about the return value of this method.
However painful to leave a change uncovered, I think that testing for these small cases doesn't seem to make much sense, as there is no compatibility in any direction, and it is not a property of the language at all.