Skip to content

Commit 03650c2

Browse files
herwinweregon
authored andcommitted
Add specs for lookarounds in regexp in linear time
1 parent 6e488a3 commit 03650c2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/regexp/linear_time_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@
2424
Regexp.linear_time?(/a/, Regexp::IGNORECASE)
2525
}.should complain(/warning: flags ignored/)
2626
end
27+
28+
ruby_version_is "3.3" do
29+
it "returns true for positive lookarounds" do
30+
Regexp.linear_time?(/(?:(?=a*)a)*/).should == true
31+
end
32+
end
2733
end

0 commit comments

Comments
 (0)