mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Ruby: Add an extra barrier guard test
This commit is contained in:
@@ -5,4 +5,4 @@
|
||||
| barrier-guards.rb:27:8:27:19 | ... != ... | barrier-guards.rb:28:5:28:7 | foo | barrier-guards.rb:27:8:27:10 | foo | false |
|
||||
| barrier-guards.rb:37:4:37:20 | call to include? | barrier-guards.rb:38:5:38:7 | foo | barrier-guards.rb:37:17:37:19 | foo | true |
|
||||
| barrier-guards.rb:43:4:43:15 | ... == ... | barrier-guards.rb:45:9:45:11 | foo | barrier-guards.rb:43:4:43:6 | foo | true |
|
||||
| barrier-guards.rb:69:4:69:21 | call to include? | barrier-guards.rb:70:5:70:7 | foo | barrier-guards.rb:69:18:69:20 | foo | true |
|
||||
| barrier-guards.rb:70:4:70:21 | call to include? | barrier-guards.rb:71:5:71:7 | foo | barrier-guards.rb:70:18:70:20 | foo | true |
|
||||
|
||||
@@ -63,11 +63,30 @@ if foo == "foo"
|
||||
my_lambda()
|
||||
end
|
||||
|
||||
foos = nil
|
||||
foos = ["foo"]
|
||||
bars = ["bar"]
|
||||
bars = NotAnArray.new
|
||||
|
||||
if foos.include?(foo)
|
||||
foo
|
||||
else
|
||||
foo
|
||||
end
|
||||
end
|
||||
|
||||
if bars.include?(foo)
|
||||
foo
|
||||
else
|
||||
foo
|
||||
end
|
||||
|
||||
bars = ["bar"]
|
||||
|
||||
if condition
|
||||
bars = nil
|
||||
end
|
||||
|
||||
if bars.include?(foo)
|
||||
foo
|
||||
else
|
||||
foo
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user