mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Ruby: fix incomplete renaming of getCanonicalEnclosing/Nested module
This commit is contained in:
@@ -957,21 +957,21 @@ class ModuleNode instanceof Module {
|
||||
/**
|
||||
* Gets the enclosing module, as it appears in the qualified name of this module.
|
||||
*
|
||||
* For example, the canonical enclosing module of `A::B` is `A`, and `A` itself has no canonical enclosing module.
|
||||
* For example, the parent module of `A::B` is `A`, and `A` itself has no parent module.
|
||||
*/
|
||||
ModuleNode getCanonicalEnclosingModule() { result = super.getParentModule() }
|
||||
ModuleNode getParentModule() { result = super.getParentModule() }
|
||||
|
||||
/**
|
||||
* Gets a module named `name` declared inside this one (not aliased), provided
|
||||
* that such a module is defined or reopened in the current codebase.
|
||||
*
|
||||
* For example, for `A::B` the canonical nested module named `C` would be `A::B::C`.
|
||||
* For example, for `A::B` the nested module named `C` would be `A::B::C`.
|
||||
*
|
||||
* Note that this is not the same as constant lookup. If `A::B::C` would resolve to a
|
||||
* module whose qualified name is not `A::B::C`, then it will not be found by
|
||||
* this predicate.
|
||||
*/
|
||||
ModuleNode getCanonicalNestedModule(string name) { result = super.getNestedModule(name) }
|
||||
ModuleNode getNestedModule(string name) { result = super.getNestedModule(name) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,12 +166,12 @@ getAnOwnInstanceVariableRead
|
||||
| tst.rb:1:1:6:3 | C1 | @field | tst.rb:4:9:4:14 | @field |
|
||||
getAnOwnInstanceVariableWriteValue
|
||||
| tst.rb:1:1:6:3 | C1 | @field | tst.rb:3:18:3:18 | 1 |
|
||||
getCanonicalEnclosingModule
|
||||
getParentModule
|
||||
| tst.rb:41:5:42:7 | N1::XY1 | tst.rb:40:1:47:3 | N1 |
|
||||
| tst.rb:43:5:46:7 | N1::N2 | tst.rb:40:1:47:3 | N1 |
|
||||
| tst.rb:44:9:45:11 | N1::N2::XY2 | tst.rb:43:5:46:7 | N1::N2 |
|
||||
| tst.rb:53:5:54:7 | N2::XY3 | tst.rb:49:1:51:3 | N2 |
|
||||
getCanonicalNestedModule
|
||||
getNestedModule
|
||||
| tst.rb:40:1:47:3 | N1 | N2 | tst.rb:43:5:46:7 | N1::N2 |
|
||||
| tst.rb:40:1:47:3 | N1 | XY1 | tst.rb:41:5:42:7 | N1::XY1 |
|
||||
| tst.rb:43:5:46:7 | N1::N2 | XY2 | tst.rb:44:9:45:11 | N1::N2::XY2 |
|
||||
|
||||
@@ -42,12 +42,12 @@ query DataFlow::Node getAnOwnInstanceVariableWriteValue(DataFlow::ModuleNode mod
|
||||
result = mod.getAnOwnInstanceVariableWriteValue(name)
|
||||
}
|
||||
|
||||
query DataFlow::ModuleNode getCanonicalEnclosingModule(DataFlow::ModuleNode mod) {
|
||||
result = mod.getCanonicalEnclosingModule()
|
||||
query DataFlow::ModuleNode getParentModule(DataFlow::ModuleNode mod) {
|
||||
result = mod.getParentModule()
|
||||
}
|
||||
|
||||
query DataFlow::ModuleNode getCanonicalNestedModule(DataFlow::ModuleNode mod, string name) {
|
||||
result = mod.getCanonicalNestedModule(name)
|
||||
query DataFlow::ModuleNode getNestedModule(DataFlow::ModuleNode mod, string name) {
|
||||
result = mod.getNestedModule(name)
|
||||
}
|
||||
|
||||
query DataFlow::Node getTopLevelConst(string name) { result = DataFlow::getConst(name) }
|
||||
|
||||
Reference in New Issue
Block a user