Skip to content

Commit 1d728b2

Browse files
committed
Ruby: Add test for protected method visibility
1 parent 58dd521 commit 1d728b2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ruby/ql/test/library-tests/modules/callgraph.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,3 +394,4 @@ publicMethod
394394
| private.rb:20:3:21:5 | public2 |
395395
| private.rb:46:3:47:5 | public |
396396
| private.rb:71:3:73:5 | call_m1 |
397+
protectedMethods

ruby/ql/test/library-tests/modules/callgraph.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ query predicate unresolvedCall(Call call) { not exists(call.getATarget()) }
77
query predicate privateMethod(MethodBase m) { m.isPrivate() }
88

99
query predicate publicMethod(MethodBase m) { m.isPublic() }
10+
11+
query predicate protectedMethods(MethodBase m) { m.isProtected() }

0 commit comments

Comments
 (0)