We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a22e2f commit 21550beCopy full SHA for 21550be
spec/ruby/core/regexp/linear_time_spec.rb
@@ -7,6 +7,10 @@
7
Regexp.linear_time?('a').should == true
8
end
9
10
+ it "returns true if matching can be done in linear time for a binary Regexp" do
11
+ Regexp.linear_time?(/[\x80-\xff]/n).should == true
12
+ end
13
+
14
it "return false if matching can't be done in linear time" do
15
Regexp.linear_time?(/(a)\1/).should == false
16
Regexp.linear_time?("(a)\\1").should == false
0 commit comments