From c5ca1089dddedd7059d68acf5a678b47e8178765 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 c3b3500549..cf9e73c37c 100644 --- a/core/regexp/linear_time_spec.rb +++ b/core/regexp/linear_time_spec.rb @@ -24,4 +24,10 @@ 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