Skip to content

Commit 8ab31bb

Browse files
committed
have getMethodName return the method being called for super-calls
1 parent ee8e018 commit 8ab31bb

File tree

9 files changed

+90
-63
lines changed

9 files changed

+90
-63
lines changed

ruby/ql/lib/codeql/ruby/ast/Call.qll

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ class MethodCall extends Call instanceof MethodCallImpl {
9494
* ```
9595
*
9696
* the result is `"bar"`.
97+
*
98+
* Super calls call a method with the same name as the current method, so
99+
* the result for a super call is the name of the current method.
100+
* E.g:
101+
* ```rb
102+
* def foo
103+
* super # the result for this super call is "foo"
104+
* end
105+
* ```
97106
*/
98107
final string getMethodName() { result = super.getMethodNameImpl() }
99108

@@ -113,7 +122,11 @@ class MethodCall extends Call instanceof MethodCallImpl {
113122
*/
114123
final predicate isSafeNavigation() { super.isSafeNavigationImpl() }
115124

116-
override string toString() { result = "call to " + this.getMethodName() }
125+
override string toString() {
126+
if this instanceof SuperCall
127+
then result = "super call to " + this.getMethodName()
128+
else result = "call to " + this.getMethodName()
129+
}
117130

118131
override AstNode getAChild(string pred) {
119132
result = Call.super.getAChild(pred)

ruby/ql/lib/codeql/ruby/ast/internal/Call.qll

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,26 @@ class ElementReferenceImpl extends MethodCallImpl, TElementReference {
112112

113113
abstract class SuperCallImpl extends MethodCallImpl, TSuperCall { }
114114

115+
private Ruby::AstNode getSuperParent(Ruby::Super sup) {
116+
result = sup
117+
or
118+
result = getSuperParent(sup).getParent() and
119+
not result instanceof Ruby::Method
120+
}
121+
122+
private string getSuperMethodName(Ruby::Super sup) {
123+
exists(Ruby::Method meth |
124+
meth = getSuperParent(sup).getParent().(Ruby::Method) and
125+
result = any(Method c | toGenerated(c) = meth).getName()
126+
)
127+
}
128+
115129
class TokenSuperCall extends SuperCallImpl, TTokenSuperCall {
116130
private Ruby::Super g;
117131

118132
TokenSuperCall() { this = TTokenSuperCall(g) }
119133

120-
final override string getMethodNameImpl() { result = g.getValue() }
134+
final override string getMethodNameImpl() { result = getSuperMethodName(g) }
121135

122136
final override Expr getReceiverImpl() { none() }
123137

@@ -133,7 +147,7 @@ class RegularSuperCall extends SuperCallImpl, TRegularSuperCall {
133147

134148
RegularSuperCall() { this = TRegularSuperCall(g) }
135149

136-
final override string getMethodNameImpl() { result = g.getMethod().(Ruby::Super).getValue() }
150+
final override string getMethodNameImpl() { result = getSuperMethodName(g.getMethod()) }
137151

138152
final override Expr getReceiverImpl() { none() }
139153

ruby/ql/test/library-tests/ast/Ast.expected

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -496,30 +496,30 @@ calls/calls.rb:
496496
# 279| getReceiver: [ConstantReadAccess] X
497497
# 284| getStmt: [ClassDeclaration] MyClass
498498
# 285| getStmt: [Method] my_method
499-
# 286| getStmt: [SuperCall] call to super
500-
# 287| getStmt: [SuperCall] call to super
501-
# 288| getStmt: [SuperCall] call to super
499+
# 286| getStmt: [SuperCall] super call to my_method
500+
# 287| getStmt: [SuperCall] super call to my_method
501+
# 288| getStmt: [SuperCall] super call to my_method
502502
# 288| getArgument: [StringLiteral] "blah"
503503
# 288| getComponent: [StringTextComponent] blah
504-
# 289| getStmt: [SuperCall] call to super
504+
# 289| getStmt: [SuperCall] super call to my_method
505505
# 289| getArgument: [IntegerLiteral] 1
506506
# 289| getArgument: [IntegerLiteral] 2
507507
# 289| getArgument: [IntegerLiteral] 3
508-
# 290| getStmt: [SuperCall] call to super
508+
# 290| getStmt: [SuperCall] super call to my_method
509509
# 290| getBlock: [BraceBlock] { ... }
510510
# 290| getParameter: [SimpleParameter] x
511511
# 290| getDefiningAccess: [LocalVariableAccess] x
512512
# 290| getStmt: [AddExpr] ... + ...
513513
# 290| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x
514514
# 290| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
515-
# 291| getStmt: [SuperCall] call to super
515+
# 291| getStmt: [SuperCall] super call to my_method
516516
# 291| getBlock: [DoBlock] do ... end
517517
# 291| getParameter: [SimpleParameter] x
518518
# 291| getDefiningAccess: [LocalVariableAccess] x
519519
# 291| getStmt: [MulExpr] ... * ...
520520
# 291| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x
521521
# 291| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 2
522-
# 292| getStmt: [SuperCall] call to super
522+
# 292| getStmt: [SuperCall] super call to my_method
523523
# 292| getArgument: [IntegerLiteral] 4
524524
# 292| getArgument: [IntegerLiteral] 5
525525
# 292| getBlock: [BraceBlock] { ... }
@@ -528,7 +528,7 @@ calls/calls.rb:
528528
# 292| getStmt: [AddExpr] ... + ...
529529
# 292| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x
530530
# 292| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 100
531-
# 293| getStmt: [SuperCall] call to super
531+
# 293| getStmt: [SuperCall] super call to my_method
532532
# 293| getArgument: [IntegerLiteral] 6
533533
# 293| getArgument: [IntegerLiteral] 7
534534
# 293| getBlock: [DoBlock] do ... end
@@ -545,7 +545,7 @@ calls/calls.rb:
545545
# 304| getStmt: [MethodCall] call to super
546546
# 304| getReceiver: [SelfVariableAccess] self
547547
# 305| getStmt: [MethodCall] call to super
548-
# 305| getReceiver: [SuperCall] call to super
548+
# 305| getReceiver: [SuperCall] super call to another_method
549549
# 310| getStmt: [MethodCall] call to call
550550
# 310| getReceiver: [MethodCall] call to foo
551551
# 310| getReceiver: [SelfVariableAccess] self
@@ -646,7 +646,7 @@ calls/calls.rb:
646646
# 328| getComponent: [StringTextComponent] error
647647
# 331| getStmt: [Method] foo
648648
# 331| getParameter: [ForwardParameter] ...
649-
# 332| getStmt: [SuperCall] call to super
649+
# 332| getStmt: [SuperCall] super call to foo
650650
# 332| getArgument: [ForwardedArguments] ...
651651
# 335| getStmt: [Method] foo
652652
# 335| getParameter: [SimpleParameter] a
@@ -1293,7 +1293,7 @@ modules/classes.rb:
12931293
# 42| getStmt: [Method] length
12941294
# 43| getStmt: [MulExpr] ... * ...
12951295
# 43| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 100
1296-
# 43| getAnOperand/getArgument/getRightOperand: [SuperCall] call to super
1296+
# 43| getAnOperand/getArgument/getRightOperand: [SuperCall] super call to length
12971297
# 46| getStmt: [Method] wibble
12981298
# 47| getStmt: [MethodCall] call to puts
12991299
# 47| getReceiver: [SelfVariableAccess] self

ruby/ql/test/library-tests/ast/calls/calls.expected

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
callsWithNoReceiverArgumentsOrBlock
22
| calls.rb:31:3:31:7 | yield ... | (none) |
3-
| calls.rb:286:5:286:9 | call to super | super |
4-
| calls.rb:287:5:287:11 | call to super | super |
5-
| calls.rb:305:5:305:9 | call to super | super |
3+
| calls.rb:286:5:286:9 | super call to my_method | my_method |
4+
| calls.rb:287:5:287:11 | super call to my_method | my_method |
5+
| calls.rb:305:5:305:9 | super call to another_method | another_method |
66
| calls.rb:345:9:345:13 | call to novar | novar |
77
callsWithArguments
88
| calls.rb:14:1:14:11 | call to foo | foo | 0 | calls.rb:14:5:14:5 | 0 |
@@ -34,17 +34,17 @@ callsWithArguments
3434
| calls.rb:275:1:275:13 | call to foo | foo | 0 | calls.rb:275:5:275:12 | ** ... |
3535
| calls.rb:278:1:278:14 | call to foo | foo | 0 | calls.rb:278:5:278:13 | Pair |
3636
| calls.rb:279:1:279:17 | call to foo | foo | 0 | calls.rb:279:5:279:16 | Pair |
37-
| calls.rb:288:5:288:16 | call to super | super | 0 | calls.rb:288:11:288:16 | "blah" |
38-
| calls.rb:289:5:289:17 | call to super | super | 0 | calls.rb:289:11:289:11 | 1 |
39-
| calls.rb:289:5:289:17 | call to super | super | 1 | calls.rb:289:14:289:14 | 2 |
40-
| calls.rb:289:5:289:17 | call to super | super | 2 | calls.rb:289:17:289:17 | 3 |
37+
| calls.rb:288:5:288:16 | super call to my_method | my_method | 0 | calls.rb:288:11:288:16 | "blah" |
38+
| calls.rb:289:5:289:17 | super call to my_method | my_method | 0 | calls.rb:289:11:289:11 | 1 |
39+
| calls.rb:289:5:289:17 | super call to my_method | my_method | 1 | calls.rb:289:14:289:14 | 2 |
40+
| calls.rb:289:5:289:17 | super call to my_method | my_method | 2 | calls.rb:289:17:289:17 | 3 |
4141
| calls.rb:290:17:290:21 | ... + ... | + | 0 | calls.rb:290:21:290:21 | 1 |
4242
| calls.rb:291:18:291:22 | ... * ... | * | 0 | calls.rb:291:22:291:22 | 2 |
43-
| calls.rb:292:5:292:30 | call to super | super | 0 | calls.rb:292:11:292:11 | 4 |
44-
| calls.rb:292:5:292:30 | call to super | super | 1 | calls.rb:292:14:292:14 | 5 |
43+
| calls.rb:292:5:292:30 | super call to my_method | my_method | 0 | calls.rb:292:11:292:11 | 4 |
44+
| calls.rb:292:5:292:30 | super call to my_method | my_method | 1 | calls.rb:292:14:292:14 | 5 |
4545
| calls.rb:292:22:292:28 | ... + ... | + | 0 | calls.rb:292:26:292:28 | 100 |
46-
| calls.rb:293:5:293:33 | call to super | super | 0 | calls.rb:293:11:293:11 | 6 |
47-
| calls.rb:293:5:293:33 | call to super | super | 1 | calls.rb:293:14:293:14 | 7 |
46+
| calls.rb:293:5:293:33 | super call to my_method | my_method | 0 | calls.rb:293:11:293:11 | 6 |
47+
| calls.rb:293:5:293:33 | super call to my_method | my_method | 1 | calls.rb:293:14:293:14 | 7 |
4848
| calls.rb:293:23:293:29 | ... + ... | + | 0 | calls.rb:293:27:293:29 | 200 |
4949
| calls.rb:311:1:311:7 | call to call | call | 0 | calls.rb:311:6:311:6 | 1 |
5050
| calls.rb:314:1:314:8 | call to foo= | foo= | 0 | calls.rb:314:12:314:13 | ... = ... |
@@ -91,7 +91,7 @@ callsWithArguments
9191
| calls.rb:320:21:320:31 | ... + ... | + | 0 | calls.rb:320:31:320:31 | 1 |
9292
| calls.rb:320:34:320:35 | ... * ... | * | 0 | calls.rb:320:37:320:37 | 2 |
9393
| calls.rb:328:25:328:37 | call to print | print | 0 | calls.rb:328:31:328:37 | "error" |
94-
| calls.rb:332:3:332:12 | call to super | super | 0 | calls.rb:332:9:332:11 | ... |
94+
| calls.rb:332:3:332:12 | super call to foo | foo | 0 | calls.rb:332:9:332:11 | ... |
9595
| calls.rb:336:3:336:13 | call to bar | bar | 0 | calls.rb:336:7:336:7 | b |
9696
| calls.rb:336:3:336:13 | call to bar | bar | 1 | calls.rb:336:10:336:12 | ... |
9797
| calls.rb:340:5:340:5 | call to [] | [] | 0 | calls.rb:340:5:340:5 | 0 |
@@ -305,7 +305,7 @@ callsWithReceiver
305305
| calls.rb:303:5:303:7 | call to foo | calls.rb:303:5:303:7 | self |
306306
| calls.rb:303:5:303:13 | call to super | calls.rb:303:5:303:7 | call to foo |
307307
| calls.rb:304:5:304:14 | call to super | calls.rb:304:5:304:8 | self |
308-
| calls.rb:305:5:305:15 | call to super | calls.rb:305:5:305:9 | call to super |
308+
| calls.rb:305:5:305:15 | call to super | calls.rb:305:5:305:9 | super call to another_method |
309309
| calls.rb:310:1:310:3 | call to foo | calls.rb:310:1:310:3 | self |
310310
| calls.rb:310:1:310:6 | call to call | calls.rb:310:1:310:3 | call to foo |
311311
| calls.rb:311:1:311:3 | call to foo | calls.rb:311:1:311:3 | self |
@@ -398,42 +398,42 @@ callsWithBlock
398398
| calls.rb:95:1:98:3 | call to foo | calls.rb:95:7:98:3 | do ... end |
399399
| calls.rb:226:1:228:3 | call to each | calls.rb:226:1:228:3 | { ... } |
400400
| calls.rb:229:1:231:3 | call to each | calls.rb:229:1:231:3 | { ... } |
401-
| calls.rb:290:5:290:23 | call to super | calls.rb:290:11:290:23 | { ... } |
402-
| calls.rb:291:5:291:26 | call to super | calls.rb:291:11:291:26 | do ... end |
403-
| calls.rb:292:5:292:30 | call to super | calls.rb:292:16:292:30 | { ... } |
404-
| calls.rb:293:5:293:33 | call to super | calls.rb:293:16:293:33 | do ... end |
401+
| calls.rb:290:5:290:23 | super call to my_method | calls.rb:290:11:290:23 | { ... } |
402+
| calls.rb:291:5:291:26 | super call to my_method | calls.rb:291:11:291:26 | do ... end |
403+
| calls.rb:292:5:292:30 | super call to my_method | calls.rb:292:16:292:30 | { ... } |
404+
| calls.rb:293:5:293:33 | super call to my_method | calls.rb:293:16:293:33 | do ... end |
405405
| calls.rb:340:1:342:3 | call to each | calls.rb:340:1:342:3 | { ... } |
406406
| calls.rb:364:1:364:23 | call to bar | calls.rb:364:15:364:23 | { ... } |
407407
| calls.rb:364:1:364:23 | call to bar | calls.rb:364:15:364:23 | { ... } |
408408
yieldCalls
409409
| calls.rb:31:3:31:7 | yield ... |
410410
| calls.rb:36:3:36:16 | yield ... |
411411
superCalls
412-
| calls.rb:286:5:286:9 | call to super |
413-
| calls.rb:287:5:287:11 | call to super |
414-
| calls.rb:288:5:288:16 | call to super |
415-
| calls.rb:289:5:289:17 | call to super |
416-
| calls.rb:290:5:290:23 | call to super |
417-
| calls.rb:291:5:291:26 | call to super |
418-
| calls.rb:292:5:292:30 | call to super |
419-
| calls.rb:293:5:293:33 | call to super |
420-
| calls.rb:305:5:305:9 | call to super |
421-
| calls.rb:332:3:332:12 | call to super |
412+
| calls.rb:286:5:286:9 | super call to my_method |
413+
| calls.rb:287:5:287:11 | super call to my_method |
414+
| calls.rb:288:5:288:16 | super call to my_method |
415+
| calls.rb:289:5:289:17 | super call to my_method |
416+
| calls.rb:290:5:290:23 | super call to my_method |
417+
| calls.rb:291:5:291:26 | super call to my_method |
418+
| calls.rb:292:5:292:30 | super call to my_method |
419+
| calls.rb:293:5:293:33 | super call to my_method |
420+
| calls.rb:305:5:305:9 | super call to another_method |
421+
| calls.rb:332:3:332:12 | super call to foo |
422422
superCallsWithArguments
423-
| calls.rb:288:5:288:16 | call to super | 0 | calls.rb:288:11:288:16 | "blah" |
424-
| calls.rb:289:5:289:17 | call to super | 0 | calls.rb:289:11:289:11 | 1 |
425-
| calls.rb:289:5:289:17 | call to super | 1 | calls.rb:289:14:289:14 | 2 |
426-
| calls.rb:289:5:289:17 | call to super | 2 | calls.rb:289:17:289:17 | 3 |
427-
| calls.rb:292:5:292:30 | call to super | 0 | calls.rb:292:11:292:11 | 4 |
428-
| calls.rb:292:5:292:30 | call to super | 1 | calls.rb:292:14:292:14 | 5 |
429-
| calls.rb:293:5:293:33 | call to super | 0 | calls.rb:293:11:293:11 | 6 |
430-
| calls.rb:293:5:293:33 | call to super | 1 | calls.rb:293:14:293:14 | 7 |
431-
| calls.rb:332:3:332:12 | call to super | 0 | calls.rb:332:9:332:11 | ... |
423+
| calls.rb:288:5:288:16 | super call to my_method | 0 | calls.rb:288:11:288:16 | "blah" |
424+
| calls.rb:289:5:289:17 | super call to my_method | 0 | calls.rb:289:11:289:11 | 1 |
425+
| calls.rb:289:5:289:17 | super call to my_method | 1 | calls.rb:289:14:289:14 | 2 |
426+
| calls.rb:289:5:289:17 | super call to my_method | 2 | calls.rb:289:17:289:17 | 3 |
427+
| calls.rb:292:5:292:30 | super call to my_method | 0 | calls.rb:292:11:292:11 | 4 |
428+
| calls.rb:292:5:292:30 | super call to my_method | 1 | calls.rb:292:14:292:14 | 5 |
429+
| calls.rb:293:5:293:33 | super call to my_method | 0 | calls.rb:293:11:293:11 | 6 |
430+
| calls.rb:293:5:293:33 | super call to my_method | 1 | calls.rb:293:14:293:14 | 7 |
431+
| calls.rb:332:3:332:12 | super call to foo | 0 | calls.rb:332:9:332:11 | ... |
432432
superCallsWithBlock
433-
| calls.rb:290:5:290:23 | call to super | calls.rb:290:11:290:23 | { ... } |
434-
| calls.rb:291:5:291:26 | call to super | calls.rb:291:11:291:26 | do ... end |
435-
| calls.rb:292:5:292:30 | call to super | calls.rb:292:16:292:30 | { ... } |
436-
| calls.rb:293:5:293:33 | call to super | calls.rb:293:16:293:33 | do ... end |
433+
| calls.rb:290:5:290:23 | super call to my_method | calls.rb:290:11:290:23 | { ... } |
434+
| calls.rb:291:5:291:26 | super call to my_method | calls.rb:291:11:291:26 | do ... end |
435+
| calls.rb:292:5:292:30 | super call to my_method | calls.rb:292:16:292:30 | { ... } |
436+
| calls.rb:293:5:293:33 | super call to my_method | calls.rb:293:16:293:33 | do ... end |
437437
setterCalls
438438
| calls.rb:314:1:314:8 | call to foo= |
439439
| calls.rb:315:1:315:6 | call to []= |

ruby/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,9 +3049,9 @@ cfg.rb:
30493049
#-----| -> exit print (normal)
30503050

30513051
# 147| self
3052-
#-----| -> call to super
3052+
#-----| -> super call to print
30533053

3054-
# 147| call to super
3054+
# 147| super call to print
30553055
#-----| -> call to print
30563056

30573057
# 147| call to print

ruby/ql/test/library-tests/controlflow/graph/Nodes.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ callsWithNoArguments
3131
| cfg.rb:138:17:138:23 | * ... |
3232
| cfg.rb:141:1:141:8 | call to itself |
3333
| cfg.rb:143:10:143:21 | call to itself |
34-
| cfg.rb:147:10:147:14 | call to super |
34+
| cfg.rb:147:10:147:14 | super call to print |
3535
| cfg.rb:147:10:147:22 | call to print |
3636
| cfg.rb:151:9:151:17 | call to new |
3737
| cfg.rb:158:16:158:21 | * ... |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ getTarget
1717
| calls.rb:60:5:60:9 | call to new | calls.rb:117:5:117:16 | new |
1818
| calls.rb:61:1:61:5 | call to baz | calls.rb:51:5:57:7 | baz |
1919
| calls.rb:63:1:63:12 | call to instance_m | calls.rb:22:5:24:7 | instance_m |
20-
| calls.rb:67:9:67:13 | call to super | calls.rb:51:5:57:7 | baz |
20+
| calls.rb:67:9:67:13 | super call to baz | calls.rb:51:5:57:7 | baz |
2121
| calls.rb:71:5:71:9 | call to new | calls.rb:117:5:117:16 | new |
2222
| calls.rb:72:1:72:5 | call to baz | calls.rb:66:5:68:7 | baz |
2323
| calls.rb:74:1:74:12 | call to instance_m | calls.rb:22:5:24:7 | instance_m |
@@ -235,7 +235,7 @@ getTarget
235235
| calls.rb:616:1:616:31 | call to call_call_singleton1 | calls.rb:591:5:593:7 | call_call_singleton1 |
236236
| hello.rb:12:5:12:24 | call to include | calls.rb:108:5:110:7 | include |
237237
| hello.rb:14:16:14:20 | call to hello | hello.rb:2:5:4:7 | hello |
238-
| hello.rb:20:16:20:20 | call to super | hello.rb:13:5:15:7 | message |
238+
| hello.rb:20:16:20:20 | super call to message | hello.rb:13:5:15:7 | message |
239239
| hello.rb:20:30:20:34 | call to world | hello.rb:5:5:7:7 | world |
240240
| instance_fields.rb:4:22:4:35 | call to new | calls.rb:117:5:117:16 | new |
241241
| instance_fields.rb:7:13:7:25 | call to target | instance_fields.rb:12:5:13:7 | target |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ enclosingMethod
638638
| calls.rb:55:9:55:19 | self | calls.rb:51:5:57:7 | baz |
639639
| calls.rb:56:9:56:12 | self | calls.rb:51:5:57:7 | baz |
640640
| calls.rb:56:9:56:24 | call to singleton_m | calls.rb:51:5:57:7 | baz |
641-
| calls.rb:67:9:67:13 | call to super | calls.rb:66:5:68:7 | baz |
641+
| calls.rb:67:9:67:13 | super call to baz | calls.rb:66:5:68:7 | baz |
642642
| calls.rb:76:18:76:18 | a | calls.rb:76:1:79:3 | optional_arg |
643643
| calls.rb:76:18:76:18 | a | calls.rb:76:1:79:3 | optional_arg |
644644
| calls.rb:76:22:76:22 | 4 | calls.rb:76:1:79:3 | optional_arg |
@@ -975,7 +975,7 @@ enclosingMethod
975975
| hello.rb:14:16:14:20 | call to hello | hello.rb:13:5:15:7 | message |
976976
| hello.rb:14:16:14:20 | self | hello.rb:13:5:15:7 | message |
977977
| hello.rb:20:9:20:40 | return | hello.rb:19:5:21:7 | message |
978-
| hello.rb:20:16:20:20 | call to super | hello.rb:19:5:21:7 | message |
978+
| hello.rb:20:16:20:20 | super call to message | hello.rb:19:5:21:7 | message |
979979
| hello.rb:20:16:20:26 | ... + ... | hello.rb:19:5:21:7 | message |
980980
| hello.rb:20:16:20:34 | ... + ... | hello.rb:19:5:21:7 | message |
981981
| hello.rb:20:16:20:40 | ... + ... | hello.rb:19:5:21:7 | message |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ enclosingModule
586586
| calls.rb:65:1:69:3 | D | calls.rb:1:1:616:32 | calls.rb |
587587
| calls.rb:65:11:65:11 | C | calls.rb:1:1:616:32 | calls.rb |
588588
| calls.rb:66:5:68:7 | baz | calls.rb:65:1:69:3 | D |
589-
| calls.rb:67:9:67:13 | call to super | calls.rb:65:1:69:3 | D |
589+
| calls.rb:67:9:67:13 | super call to baz | calls.rb:65:1:69:3 | D |
590590
| calls.rb:71:1:71:1 | d | calls.rb:1:1:616:32 | calls.rb |
591591
| calls.rb:71:1:71:9 | ... = ... | calls.rb:1:1:616:32 | calls.rb |
592592
| calls.rb:71:5:71:5 | D | calls.rb:1:1:616:32 | calls.rb |
@@ -1513,7 +1513,7 @@ enclosingModule
15131513
| hello.rb:18:20:18:27 | Greeting | hello.rb:1:1:22:3 | hello.rb |
15141514
| hello.rb:19:5:21:7 | message | hello.rb:18:1:22:3 | HelloWorld |
15151515
| hello.rb:20:9:20:40 | return | hello.rb:18:1:22:3 | HelloWorld |
1516-
| hello.rb:20:16:20:20 | call to super | hello.rb:18:1:22:3 | HelloWorld |
1516+
| hello.rb:20:16:20:20 | super call to message | hello.rb:18:1:22:3 | HelloWorld |
15171517
| hello.rb:20:16:20:26 | ... + ... | hello.rb:18:1:22:3 | HelloWorld |
15181518
| hello.rb:20:16:20:34 | ... + ... | hello.rb:18:1:22:3 | HelloWorld |
15191519
| hello.rb:20:16:20:40 | ... + ... | hello.rb:18:1:22:3 | HelloWorld |

0 commit comments

Comments
 (0)