Skip to content

Commit

Permalink
Add specs for lookarounds in regexp in linear time
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Dec 3, 2024
1 parent 2ca97d4 commit d61689b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/regexp/linear_time_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d61689b

Please sign in to comment.