mirror of
https://github.com/github/codeql.git
synced 2026-08-04 17:33:18 +02:00
14 lines
500 B
Ruby
14 lines
500 B
Ruby
module Foo
|
|
def bar(x) # $ Source
|
|
# Run the /a+$/ regex on the input x.
|
|
match = x.match(/a+$/) # $ Alert
|
|
end
|
|
|
|
protected
|
|
def baz(x) # $ Source
|
|
match = x.match(/a+$/) # $ Alert
|
|
|
|
match2 = x.match(/(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)(AA|BB)C.*Y$/) # $ Alert
|
|
end
|
|
end
|