Files
codeql/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.rb
Harry Maclean 13a0ece25c Ruby: Add test case: array constant barrier guard
This guard isn't yet recognised as a `StringConstArrayInclusionCall`.
2022-01-20 17:07:01 +13:00

41 lines
305 B
Ruby

foo = "foo"
if foo == "foo"
foo
else
foo
end
if ["foo"].include?(foo)
foo
else
foo
end
if foo != "foo"
foo
else
foo
end
unless foo == "foo"
foo
else
foo
end
unless foo != "foo"
foo
else
foo
end
foo
FOO = ["foo"]
if FOO.include?(foo)
foo
else
foo
end