Skip to content

Commit 77c47bc

Browse files
hvitvedaibaars
authored andcommitted
Ruby: Add another call graph test
1 parent 44cc6f7 commit 77c47bc

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ getTarget
186186
| calls.rb:488:1:488:31 | call to singleton | calls.rb:481:5:483:7 | singleton |
187187
| calls.rb:494:1:494:32 | call to singleton | calls.rb:481:5:483:7 | singleton |
188188
| calls.rb:501:1:501:32 | call to singleton | calls.rb:481:5:483:7 | singleton |
189+
| calls.rb:504:1:504:13 | call to singleton | calls.rb:481:5:483:7 | singleton |
189190
| calls.rb:507:1:507:13 | call to singleton | calls.rb:481:5:483:7 | singleton |
190191
| calls.rb:516:5:516:35 | call to include | calls.rb:108:5:110:7 | include |
191192
| calls.rb:519:9:519:35 | call to puts | calls.rb:102:5:102:30 | puts |

ruby/ql/test/library-tests/modules/calls.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ module ExtendSingletonMethod3
501501
ExtendSingletonMethod3.singleton
502502

503503
foo = "hello"
504-
504+
foo.singleton # NoMethodError
505505
foo.extend ExtendSingletonMethod
506506

507507
foo.singleton

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,8 @@ enclosingModule
12311231
| calls.rb:503:1:503:13 | ... = ... | calls.rb:1:1:543:28 | calls.rb |
12321232
| calls.rb:503:7:503:13 | "hello" | calls.rb:1:1:543:28 | calls.rb |
12331233
| calls.rb:503:8:503:12 | hello | calls.rb:1:1:543:28 | calls.rb |
1234+
| calls.rb:504:1:504:3 | foo | calls.rb:1:1:543:28 | calls.rb |
1235+
| calls.rb:504:1:504:13 | call to singleton | calls.rb:1:1:543:28 | calls.rb |
12341236
| calls.rb:505:1:505:3 | foo | calls.rb:1:1:543:28 | calls.rb |
12351237
| calls.rb:505:1:505:32 | call to extend | calls.rb:1:1:543:28 | calls.rb |
12361238
| calls.rb:505:12:505:32 | ExtendSingletonMethod | calls.rb:1:1:543:28 | calls.rb |

0 commit comments

Comments
 (0)