Skip to content

Commit c2b98a4

Browse files
committed
Ruby: add support for 'extend' method
1 parent 09bc78e commit c2b98a4

File tree

7 files changed

+800
-683
lines changed

7 files changed

+800
-683
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowDispatch.qll

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,26 @@ private DataFlowCallable viableLibraryCallable(DataFlowCall call) {
294294
)
295295
}
296296

297+
/** Holds if there is a call like `receiver.extend(M)` */
298+
private predicate extendCall(DataFlow::LocalSourceNode receiver, Module m) {
299+
exists(DataFlow::CallNode extendCall |
300+
extendCall.getMethodName() = "extend" and
301+
exists(DataFlow::LocalSourceNode sourceNode | sourceNode.flowsTo(extendCall.getArgument(0)) |
302+
selfInModule(sourceNode.(SsaSelfDefinitionNode).getVariable(), m) or
303+
sourceNode = trackModuleAccess(m)
304+
) and
305+
receiver.flowsTo(extendCall.getReceiver())
306+
)
307+
}
308+
309+
/** Holds if there is a call like `M.extend(N)` */
310+
private predicate extendCallModule(Module m, Module n) {
311+
exists(DataFlow::LocalSourceNode receiver | extendCall(receiver, n) |
312+
selfInModule(receiver.(SsaSelfDefinitionNode).getVariable(), m) or
313+
receiver = trackModuleAccess(m)
314+
)
315+
}
316+
297317
cached
298318
private module Cached {
299319
cached
@@ -340,15 +360,46 @@ private module Cached {
340360
// def c.singleton; end # <- result
341361
// c.singleton # <- call
342362
// ```
363+
// or an `extend`ed instance, e.g.
364+
// ```rb
365+
// c = C.new
366+
// module M
367+
// def instance; end # <- result
368+
// end
369+
// c.extend M
370+
// c.instance # <- call
371+
// ```
343372
exists(DataFlow::Node receiver |
344373
methodCall(call, receiver, method) and
345-
receiver = trackSingletonMethodOnInstance(result, method)
374+
(
375+
receiver = trackSingletonMethodOnInstance(result, method)
376+
or
377+
exists(Module m |
378+
extendCall(any(DataFlow::LocalSourceNode n | n.flowsTo(receiver)), m) and
379+
result = lookupMethod(m, pragma[only_bind_into](method))
380+
)
381+
)
346382
)
347383
or
348384
// singleton method defined on a module
385+
// or an `extend`ed module, e.g.
386+
// ```rb
387+
// module M
388+
// def instance; end # <- result
389+
// end
390+
// M.extend(M)
391+
// M.instance # <- call
392+
// ```
349393
exists(DataFlow::Node sourceNode, Module m |
350394
flowsToMethodCall(call, sourceNode, method) and
351-
singletonMethodOnModule(result, method, m)
395+
(
396+
singletonMethodOnModule(result, method, m)
397+
or
398+
exists(Module other |
399+
extendCallModule(m, other) and
400+
result = lookupMethod(other, pragma[only_bind_into](method))
401+
)
402+
)
352403
|
353404
// ```rb
354405
// def C.singleton; end # <- result

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,17 @@ calls.rb:
9797

9898
# 480| ExtendSingletonMethod
9999

100-
# 490| ProtectedMethodInModule
100+
# 490| ExtendSingletonMethod2
101101

102-
# 496| ProtectedMethods
102+
# 496| ExtendSingletonMethod3
103+
104+
# 509| ProtectedMethodInModule
105+
106+
# 515| ProtectedMethods
103107
#-----| super -> Object
104108
#-----| include -> ProtectedMethodInModule
105109

106-
# 515| ProtectedMethodsSub
110+
# 534| ProtectedMethodsSub
107111
#-----| super -> ProtectedMethods
108112

109113
hello.rb:

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

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,29 @@ getTarget
183183
| calls.rb:476:1:476:27 | call to new | calls.rb:117:5:117:16 | new |
184184
| calls.rb:477:1:477:27 | call to new | calls.rb:117:5:117:16 | new |
185185
| calls.rb:478:1:478:27 | call to new | calls.rb:117:5:117:16 | new |
186-
| calls.rb:497:5:497:35 | call to include | calls.rb:108:5:110:7 | include |
187-
| calls.rb:500:9:500:35 | call to puts | calls.rb:102:5:102:30 | puts |
188-
| calls.rb:504:9:504:11 | call to foo | calls.rb:491:15:493:7 | foo |
189-
| calls.rb:505:9:505:11 | call to bar | calls.rb:499:15:501:7 | bar |
190-
| calls.rb:506:9:506:28 | call to new | calls.rb:117:5:117:16 | new |
191-
| calls.rb:506:9:506:32 | call to foo | calls.rb:491:15:493:7 | foo |
192-
| calls.rb:507:9:507:28 | call to new | calls.rb:117:5:117:16 | new |
193-
| calls.rb:507:9:507:32 | call to bar | calls.rb:499:15:501:7 | bar |
194-
| calls.rb:511:1:511:20 | call to new | calls.rb:117:5:117:16 | new |
195-
| calls.rb:512:1:512:20 | call to new | calls.rb:117:5:117:16 | new |
196-
| calls.rb:513:1:513:20 | call to new | calls.rb:117:5:117:16 | new |
197-
| calls.rb:513:1:513:24 | call to baz | calls.rb:503:5:508:7 | baz |
198-
| calls.rb:517:9:517:11 | call to foo | calls.rb:491:15:493:7 | foo |
199-
| calls.rb:518:9:518:31 | call to new | calls.rb:117:5:117:16 | new |
200-
| calls.rb:518:9:518:35 | call to foo | calls.rb:491:15:493:7 | foo |
201-
| calls.rb:522:1:522:23 | call to new | calls.rb:117:5:117:16 | new |
202-
| calls.rb:523:1:523:23 | call to new | calls.rb:117:5:117:16 | new |
203-
| calls.rb:524:1:524:23 | call to new | calls.rb:117:5:117:16 | new |
204-
| calls.rb:524:1:524:27 | call to baz | calls.rb:516:5:519:7 | baz |
186+
| calls.rb:488:1:488:31 | call to singleton | calls.rb:481:5:483:7 | singleton |
187+
| calls.rb:494:1:494:32 | call to singleton | calls.rb:481:5:483:7 | singleton |
188+
| calls.rb:501:1:501:32 | call to singleton | calls.rb:481:5:483:7 | singleton |
189+
| calls.rb:507:1:507:13 | call to singleton | calls.rb:481:5:483:7 | singleton |
190+
| calls.rb:516:5:516:35 | call to include | calls.rb:108:5:110:7 | include |
191+
| calls.rb:519:9:519:35 | call to puts | calls.rb:102:5:102:30 | puts |
192+
| calls.rb:523:9:523:11 | call to foo | calls.rb:510:15:512:7 | foo |
193+
| calls.rb:524:9:524:11 | call to bar | calls.rb:518:15:520:7 | bar |
194+
| calls.rb:525:9:525:28 | call to new | calls.rb:117:5:117:16 | new |
195+
| calls.rb:525:9:525:32 | call to foo | calls.rb:510:15:512:7 | foo |
196+
| calls.rb:526:9:526:28 | call to new | calls.rb:117:5:117:16 | new |
197+
| calls.rb:526:9:526:32 | call to bar | calls.rb:518:15:520:7 | bar |
198+
| calls.rb:530:1:530:20 | call to new | calls.rb:117:5:117:16 | new |
199+
| calls.rb:531:1:531:20 | call to new | calls.rb:117:5:117:16 | new |
200+
| calls.rb:532:1:532:20 | call to new | calls.rb:117:5:117:16 | new |
201+
| calls.rb:532:1:532:24 | call to baz | calls.rb:522:5:527:7 | baz |
202+
| calls.rb:536:9:536:11 | call to foo | calls.rb:510:15:512:7 | foo |
203+
| calls.rb:537:9:537:31 | call to new | calls.rb:117:5:117:16 | new |
204+
| calls.rb:537:9:537:35 | call to foo | calls.rb:510:15:512:7 | foo |
205+
| calls.rb:541:1:541:23 | call to new | calls.rb:117:5:117:16 | new |
206+
| calls.rb:542:1:542:23 | call to new | calls.rb:117:5:117:16 | new |
207+
| calls.rb:543:1:543:23 | call to new | calls.rb:117:5:117:16 | new |
208+
| calls.rb:543:1:543:27 | call to baz | calls.rb:535:5:538:7 | baz |
205209
| hello.rb:12:5:12:24 | call to include | calls.rb:108:5:110:7 | include |
206210
| hello.rb:14:16:14:20 | call to hello | hello.rb:2:5:4:7 | hello |
207211
| hello.rb:20:16:20:20 | call to super | hello.rb:13:5:15:7 | message |
@@ -304,14 +308,16 @@ unresolvedCall
304308
| calls.rb:478:1:478:33 | call to baz_2 |
305309
| calls.rb:482:9:482:46 | call to puts |
306310
| calls.rb:485:5:485:15 | call to extend |
307-
| calls.rb:488:1:488:31 | call to singleton |
308-
| calls.rb:491:5:493:7 | call to protected |
309-
| calls.rb:492:9:492:42 | call to puts |
310-
| calls.rb:499:5:501:7 | call to protected |
311-
| calls.rb:511:1:511:24 | call to foo |
312-
| calls.rb:512:1:512:24 | call to bar |
313-
| calls.rb:522:1:522:27 | call to foo |
314-
| calls.rb:523:1:523:27 | call to bar |
311+
| calls.rb:491:5:491:32 | call to extend |
312+
| calls.rb:499:1:499:51 | call to extend |
313+
| calls.rb:505:1:505:32 | call to extend |
314+
| calls.rb:510:5:512:7 | call to protected |
315+
| calls.rb:511:9:511:42 | call to puts |
316+
| calls.rb:518:5:520:7 | call to protected |
317+
| calls.rb:530:1:530:24 | call to foo |
318+
| calls.rb:531:1:531:24 | call to bar |
319+
| calls.rb:541:1:541:27 | call to foo |
320+
| calls.rb:542:1:542:27 | call to bar |
315321
| hello.rb:20:16:20:26 | ... + ... |
316322
| hello.rb:20:16:20:34 | ... + ... |
317323
| hello.rb:20:16:20:40 | ... + ... |
@@ -411,8 +417,8 @@ publicMethod
411417
| calls.rb:430:13:432:15 | m4 |
412418
| calls.rb:440:13:442:15 | m5 |
413419
| calls.rb:481:5:483:7 | singleton |
414-
| calls.rb:503:5:508:7 | baz |
415-
| calls.rb:516:5:519:7 | baz |
420+
| calls.rb:522:5:527:7 | baz |
421+
| calls.rb:535:5:538:7 | baz |
416422
| hello.rb:2:5:4:7 | hello |
417423
| hello.rb:5:5:7:7 | world |
418424
| hello.rb:13:5:15:7 | message |
@@ -429,7 +435,7 @@ publicMethod
429435
| private.rb:66:3:67:5 | public |
430436
| private.rb:91:3:93:5 | call_m1 |
431437
protectedMethod
432-
| calls.rb:491:15:493:7 | foo |
433-
| calls.rb:499:15:501:7 | bar |
438+
| calls.rb:510:15:512:7 | foo |
439+
| calls.rb:518:15:520:7 | bar |
434440
| private.rb:32:3:33:5 | protected1 |
435441
| private.rb:35:3:36:5 | protected2 |

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,26 @@ def singleton
485485
extend self
486486
end
487487

488-
ExtendSingletonMethod.singleton # currently unable to resolve
488+
ExtendSingletonMethod.singleton
489+
490+
module ExtendSingletonMethod2
491+
extend ExtendSingletonMethod
492+
end
493+
494+
ExtendSingletonMethod2.singleton
495+
496+
module ExtendSingletonMethod3
497+
end
498+
499+
ExtendSingletonMethod3.extend ExtendSingletonMethod
500+
501+
ExtendSingletonMethod3.singleton
502+
503+
foo = "hello"
504+
505+
foo.extend ExtendSingletonMethod
506+
507+
foo.singleton
489508

490509
module ProtectedMethodInModule
491510
protected def foo

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

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ getMethod
3939
| calls.rb:417:1:445:3 | ConditionalInstanceMethods | m1 | calls.rb:419:9:421:11 | m1 |
4040
| calls.rb:417:1:445:3 | ConditionalInstanceMethods | m2 | calls.rb:424:5:436:7 | m2 |
4141
| calls.rb:480:1:486:3 | ExtendSingletonMethod | singleton | calls.rb:481:5:483:7 | singleton |
42-
| calls.rb:490:1:494:3 | ProtectedMethodInModule | foo | calls.rb:491:15:493:7 | foo |
43-
| calls.rb:496:1:509:3 | ProtectedMethods | bar | calls.rb:499:15:501:7 | bar |
44-
| calls.rb:496:1:509:3 | ProtectedMethods | baz | calls.rb:503:5:508:7 | baz |
45-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | baz | calls.rb:516:5:519:7 | baz |
42+
| calls.rb:509:1:513:3 | ProtectedMethodInModule | foo | calls.rb:510:15:512:7 | foo |
43+
| calls.rb:515:1:528:3 | ProtectedMethods | bar | calls.rb:518:15:520:7 | bar |
44+
| calls.rb:515:1:528:3 | ProtectedMethods | baz | calls.rb:522:5:527:7 | baz |
45+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | baz | calls.rb:535:5:538:7 | baz |
4646
| hello.rb:1:1:8:3 | EnglishWords | hello | hello.rb:2:5:4:7 | hello |
4747
| hello.rb:1:1:8:3 | EnglishWords | world | hello.rb:5:5:7:7 | world |
4848
| hello.rb:11:1:16:3 | Greeting | message | hello.rb:13:5:15:7 | message |
@@ -357,37 +357,37 @@ lookupMethod
357357
| calls.rb:417:1:445:3 | ConditionalInstanceMethods | puts | calls.rb:102:5:102:30 | puts |
358358
| calls.rb:417:1:445:3 | ConditionalInstanceMethods | to_s | calls.rb:172:5:173:7 | to_s |
359359
| calls.rb:480:1:486:3 | ExtendSingletonMethod | singleton | calls.rb:481:5:483:7 | singleton |
360-
| calls.rb:490:1:494:3 | ProtectedMethodInModule | foo | calls.rb:491:15:493:7 | foo |
361-
| calls.rb:496:1:509:3 | ProtectedMethods | add_singleton | calls.rb:367:1:371:3 | add_singleton |
362-
| calls.rb:496:1:509:3 | ProtectedMethods | bar | calls.rb:499:15:501:7 | bar |
363-
| calls.rb:496:1:509:3 | ProtectedMethods | baz | calls.rb:503:5:508:7 | baz |
364-
| calls.rb:496:1:509:3 | ProtectedMethods | call_block | calls.rb:81:1:83:3 | call_block |
365-
| calls.rb:496:1:509:3 | ProtectedMethods | call_instance_m | calls.rb:39:1:41:3 | call_instance_m |
366-
| calls.rb:496:1:509:3 | ProtectedMethods | create | calls.rb:278:1:286:3 | create |
367-
| calls.rb:496:1:509:3 | ProtectedMethods | foo | calls.rb:491:15:493:7 | foo |
368-
| calls.rb:496:1:509:3 | ProtectedMethods | funny | calls.rb:140:1:142:3 | funny |
369-
| calls.rb:496:1:509:3 | ProtectedMethods | indirect | calls.rb:158:1:160:3 | indirect |
370-
| calls.rb:496:1:509:3 | ProtectedMethods | new | calls.rb:117:5:117:16 | new |
371-
| calls.rb:496:1:509:3 | ProtectedMethods | optional_arg | calls.rb:76:1:79:3 | optional_arg |
372-
| calls.rb:496:1:509:3 | ProtectedMethods | pattern_dispatch | calls.rb:343:1:359:3 | pattern_dispatch |
373-
| calls.rb:496:1:509:3 | ProtectedMethods | private_on_main | calls.rb:185:1:186:3 | private_on_main |
374-
| calls.rb:496:1:509:3 | ProtectedMethods | puts | calls.rb:102:5:102:30 | puts |
375-
| calls.rb:496:1:509:3 | ProtectedMethods | to_s | calls.rb:172:5:173:7 | to_s |
376-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | add_singleton | calls.rb:367:1:371:3 | add_singleton |
377-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | bar | calls.rb:499:15:501:7 | bar |
378-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | baz | calls.rb:516:5:519:7 | baz |
379-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | call_block | calls.rb:81:1:83:3 | call_block |
380-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | call_instance_m | calls.rb:39:1:41:3 | call_instance_m |
381-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | create | calls.rb:278:1:286:3 | create |
382-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | foo | calls.rb:491:15:493:7 | foo |
383-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | funny | calls.rb:140:1:142:3 | funny |
384-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | indirect | calls.rb:158:1:160:3 | indirect |
385-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | new | calls.rb:117:5:117:16 | new |
386-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | optional_arg | calls.rb:76:1:79:3 | optional_arg |
387-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | pattern_dispatch | calls.rb:343:1:359:3 | pattern_dispatch |
388-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | private_on_main | calls.rb:185:1:186:3 | private_on_main |
389-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | puts | calls.rb:102:5:102:30 | puts |
390-
| calls.rb:515:1:520:3 | ProtectedMethodsSub | to_s | calls.rb:172:5:173:7 | to_s |
360+
| calls.rb:509:1:513:3 | ProtectedMethodInModule | foo | calls.rb:510:15:512:7 | foo |
361+
| calls.rb:515:1:528:3 | ProtectedMethods | add_singleton | calls.rb:367:1:371:3 | add_singleton |
362+
| calls.rb:515:1:528:3 | ProtectedMethods | bar | calls.rb:518:15:520:7 | bar |
363+
| calls.rb:515:1:528:3 | ProtectedMethods | baz | calls.rb:522:5:527:7 | baz |
364+
| calls.rb:515:1:528:3 | ProtectedMethods | call_block | calls.rb:81:1:83:3 | call_block |
365+
| calls.rb:515:1:528:3 | ProtectedMethods | call_instance_m | calls.rb:39:1:41:3 | call_instance_m |
366+
| calls.rb:515:1:528:3 | ProtectedMethods | create | calls.rb:278:1:286:3 | create |
367+
| calls.rb:515:1:528:3 | ProtectedMethods | foo | calls.rb:510:15:512:7 | foo |
368+
| calls.rb:515:1:528:3 | ProtectedMethods | funny | calls.rb:140:1:142:3 | funny |
369+
| calls.rb:515:1:528:3 | ProtectedMethods | indirect | calls.rb:158:1:160:3 | indirect |
370+
| calls.rb:515:1:528:3 | ProtectedMethods | new | calls.rb:117:5:117:16 | new |
371+
| calls.rb:515:1:528:3 | ProtectedMethods | optional_arg | calls.rb:76:1:79:3 | optional_arg |
372+
| calls.rb:515:1:528:3 | ProtectedMethods | pattern_dispatch | calls.rb:343:1:359:3 | pattern_dispatch |
373+
| calls.rb:515:1:528:3 | ProtectedMethods | private_on_main | calls.rb:185:1:186:3 | private_on_main |
374+
| calls.rb:515:1:528:3 | ProtectedMethods | puts | calls.rb:102:5:102:30 | puts |
375+
| calls.rb:515:1:528:3 | ProtectedMethods | to_s | calls.rb:172:5:173:7 | to_s |
376+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | add_singleton | calls.rb:367:1:371:3 | add_singleton |
377+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | bar | calls.rb:518:15:520:7 | bar |
378+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | baz | calls.rb:535:5:538:7 | baz |
379+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | call_block | calls.rb:81:1:83:3 | call_block |
380+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | call_instance_m | calls.rb:39:1:41:3 | call_instance_m |
381+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | create | calls.rb:278:1:286:3 | create |
382+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | foo | calls.rb:510:15:512:7 | foo |
383+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | funny | calls.rb:140:1:142:3 | funny |
384+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | indirect | calls.rb:158:1:160:3 | indirect |
385+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | new | calls.rb:117:5:117:16 | new |
386+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | optional_arg | calls.rb:76:1:79:3 | optional_arg |
387+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | pattern_dispatch | calls.rb:343:1:359:3 | pattern_dispatch |
388+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | private_on_main | calls.rb:185:1:186:3 | private_on_main |
389+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | puts | calls.rb:102:5:102:30 | puts |
390+
| calls.rb:534:1:539:3 | ProtectedMethodsSub | to_s | calls.rb:172:5:173:7 | to_s |
391391
| file://:0:0:0:0 | Class | include | calls.rb:108:5:110:7 | include |
392392
| file://:0:0:0:0 | Class | module_eval | calls.rb:107:5:107:24 | module_eval |
393393
| file://:0:0:0:0 | Class | new | calls.rb:117:5:117:16 | new |
@@ -809,29 +809,29 @@ enclosingMethod
809809
| calls.rb:482:9:482:46 | self | calls.rb:481:5:483:7 | singleton |
810810
| calls.rb:482:14:482:46 | "ExtendSingletonMethod#singleton" | calls.rb:481:5:483:7 | singleton |
811811
| calls.rb:482:15:482:45 | ExtendSingletonMethod#singleton | calls.rb:481:5:483:7 | singleton |
812-
| calls.rb:492:9:492:42 | call to puts | calls.rb:491:15:493:7 | foo |
813-
| calls.rb:492:9:492:42 | self | calls.rb:491:15:493:7 | foo |
814-
| calls.rb:492:14:492:42 | "ProtectedMethodInModule#foo" | calls.rb:491:15:493:7 | foo |
815-
| calls.rb:492:15:492:41 | ProtectedMethodInModule#foo | calls.rb:491:15:493:7 | foo |
816-
| calls.rb:500:9:500:35 | call to puts | calls.rb:499:15:501:7 | bar |
817-
| calls.rb:500:9:500:35 | self | calls.rb:499:15:501:7 | bar |
818-
| calls.rb:500:14:500:35 | "ProtectedMethods#bar" | calls.rb:499:15:501:7 | bar |
819-
| calls.rb:500:15:500:34 | ProtectedMethods#bar | calls.rb:499:15:501:7 | bar |
820-
| calls.rb:504:9:504:11 | call to foo | calls.rb:503:5:508:7 | baz |
821-
| calls.rb:504:9:504:11 | self | calls.rb:503:5:508:7 | baz |
822-
| calls.rb:505:9:505:11 | call to bar | calls.rb:503:5:508:7 | baz |
823-
| calls.rb:505:9:505:11 | self | calls.rb:503:5:508:7 | baz |
824-
| calls.rb:506:9:506:24 | ProtectedMethods | calls.rb:503:5:508:7 | baz |
825-
| calls.rb:506:9:506:28 | call to new | calls.rb:503:5:508:7 | baz |
826-
| calls.rb:506:9:506:32 | call to foo | calls.rb:503:5:508:7 | baz |
827-
| calls.rb:507:9:507:24 | ProtectedMethods | calls.rb:503:5:508:7 | baz |
828-
| calls.rb:507:9:507:28 | call to new | calls.rb:503:5:508:7 | baz |
829-
| calls.rb:507:9:507:32 | call to bar | calls.rb:503:5:508:7 | baz |
830-
| calls.rb:517:9:517:11 | call to foo | calls.rb:516:5:519:7 | baz |
831-
| calls.rb:517:9:517:11 | self | calls.rb:516:5:519:7 | baz |
832-
| calls.rb:518:9:518:27 | ProtectedMethodsSub | calls.rb:516:5:519:7 | baz |
833-
| calls.rb:518:9:518:31 | call to new | calls.rb:516:5:519:7 | baz |
834-
| calls.rb:518:9:518:35 | call to foo | calls.rb:516:5:519:7 | baz |
812+
| calls.rb:511:9:511:42 | call to puts | calls.rb:510:15:512:7 | foo |
813+
| calls.rb:511:9:511:42 | self | calls.rb:510:15:512:7 | foo |
814+
| calls.rb:511:14:511:42 | "ProtectedMethodInModule#foo" | calls.rb:510:15:512:7 | foo |
815+
| calls.rb:511:15:511:41 | ProtectedMethodInModule#foo | calls.rb:510:15:512:7 | foo |
816+
| calls.rb:519:9:519:35 | call to puts | calls.rb:518:15:520:7 | bar |
817+
| calls.rb:519:9:519:35 | self | calls.rb:518:15:520:7 | bar |
818+
| calls.rb:519:14:519:35 | "ProtectedMethods#bar" | calls.rb:518:15:520:7 | bar |
819+
| calls.rb:519:15:519:34 | ProtectedMethods#bar | calls.rb:518:15:520:7 | bar |
820+
| calls.rb:523:9:523:11 | call to foo | calls.rb:522:5:527:7 | baz |
821+
| calls.rb:523:9:523:11 | self | calls.rb:522:5:527:7 | baz |
822+
| calls.rb:524:9:524:11 | call to bar | calls.rb:522:5:527:7 | baz |
823+
| calls.rb:524:9:524:11 | self | calls.rb:522:5:527:7 | baz |
824+
| calls.rb:525:9:525:24 | ProtectedMethods | calls.rb:522:5:527:7 | baz |
825+
| calls.rb:525:9:525:28 | call to new | calls.rb:522:5:527:7 | baz |
826+
| calls.rb:525:9:525:32 | call to foo | calls.rb:522:5:527:7 | baz |
827+
| calls.rb:526:9:526:24 | ProtectedMethods | calls.rb:522:5:527:7 | baz |
828+
| calls.rb:526:9:526:28 | call to new | calls.rb:522:5:527:7 | baz |
829+
| calls.rb:526:9:526:32 | call to bar | calls.rb:522:5:527:7 | baz |
830+
| calls.rb:536:9:536:11 | call to foo | calls.rb:535:5:538:7 | baz |
831+
| calls.rb:536:9:536:11 | self | calls.rb:535:5:538:7 | baz |
832+
| calls.rb:537:9:537:27 | ProtectedMethodsSub | calls.rb:535:5:538:7 | baz |
833+
| calls.rb:537:9:537:31 | call to new | calls.rb:535:5:538:7 | baz |
834+
| calls.rb:537:9:537:35 | call to foo | calls.rb:535:5:538:7 | baz |
835835
| hello.rb:3:9:3:22 | return | hello.rb:2:5:4:7 | hello |
836836
| hello.rb:3:16:3:22 | "hello" | hello.rb:2:5:4:7 | hello |
837837
| hello.rb:3:17:3:21 | hello | hello.rb:2:5:4:7 | hello |

0 commit comments

Comments
 (0)