From d61689be66ea798a4f4517aa838d748c5782dd39 Mon Sep 17 00:00:00 2001 From: Herwin Date: Tue, 3 Dec 2024 19:18:50 +0100 Subject: [PATCH] Add specs for lookarounds in regexp in linear time --- core/regexp/linear_time_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/regexp/linear_time_spec.rb b/core/regexp/linear_time_spec.rb index 4dc436264..5d5e87fdf 100644 --- a/core/regexp/linear_time_spec.rb +++ b/core/regexp/linear_time_spec.rb @@ -21,5 +21,11 @@ Regexp.linear_time?(/a/, Regexp::IGNORECASE) }.should complain(/warning: flags ignored/) end + + ruby_version_is "3.3" do + it "returns true for positive lookarounds" do + Regexp.linear_time?(/(?:(?=a*)a)*/).should == true + end + end end end