Skip to content

Commit ea75996

Browse files
authored
Merge pull request github#13005 from kaspersv/kaspersv/ruby-explicit-this-receivers
Ruby: Make implicit this receivers explicit
2 parents 3f645e9 + 68cf33e commit ea75996

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ruby/ql/lib/codeql/ruby/filters/GeneratedCode.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ abstract class GeneratedCodeComment extends Ruby::Comment { }
1919
*/
2020
class GenericGeneratedCodeComment extends GeneratedCodeComment {
2121
GenericGeneratedCodeComment() {
22-
exists(string line, string entity, string was, string automatically | line = getValue() |
22+
exists(string line, string entity, string was, string automatically | line = this.getValue() |
2323
entity = "file|class|art[ei]fact|module|script" and
2424
was = "was|is|has been" and
2525
automatically = "automatically |mechanically |auto[- ]?" and
@@ -32,7 +32,7 @@ class GenericGeneratedCodeComment extends GeneratedCodeComment {
3232
/** A comment warning against modifications. */
3333
class DontModifyMarkerComment extends GeneratedCodeComment {
3434
DontModifyMarkerComment() {
35-
exists(string line | line = getValue() |
35+
exists(string line | line = this.getValue() |
3636
line.regexpMatch("(?i).*\\bGenerated by\\b.*\\bDo not edit\\b.*") or
3737
line.regexpMatch("(?i).*\\bAny modifications to this file will be lost\\b.*")
3838
)

ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModelsSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ predicate invocationMatchesExtraCallSiteFilter(InvokeNode invoke, AccessPathToke
211211
/** An API graph node representing a method call. */
212212
class InvokeNode extends API::MethodAccessNode {
213213
/** Gets the number of arguments to the call. */
214-
int getNumArgument() { result = getCallNode().getNumberOfArguments() }
214+
int getNumArgument() { result = this.getCallNode().getNumberOfArguments() }
215215
}
216216

217217
/** Gets the `InvokeNode` corresponding to a specific invocation of `node`. */

0 commit comments

Comments
 (0)