Skip to content

Commit 6d7a8a7

Browse files
committed
ruby: add tests for dead store
1 parent 897314c commit 6d7a8a7

File tree

1 file changed

+20
-0
lines changed
  • ruby/ql/test/library-tests/controlflow/graph

1 file changed

+20
-0
lines changed

ruby/ql/test/library-tests/controlflow/graph/raise.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,23 @@ def m16(b1, b2)
180180
return 3
181181
end
182182
end
183+
184+
def m17(b1, b2)
185+
begin
186+
raise ExceptionA if b1
187+
rescue ExceptionA
188+
if b2
189+
b1 = false
190+
retry
191+
end
192+
end
193+
194+
def m18(b2)
195+
b1 = true
196+
begin
197+
raise ExceptionA if b1
198+
rescue ExceptionA
199+
if b2
200+
b1 = false
201+
end
202+
end

0 commit comments

Comments
 (0)