Skip to content

Commit e180b7e

Browse files
committed
Ruby: add locations for module object nodes
1 parent 8c0c335 commit e180b7e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ruby/ql/lib/codeql/ruby/ApiGraphs.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ module API {
359359
Location getLocation() {
360360
result = this.getInducingNode().getLocation()
361361
or
362+
exists(DataFlow::ModuleNode mod |
363+
this = Impl::MkModuleObject(mod) and
364+
result = mod.getLocation()
365+
)
366+
or
362367
// For nodes that do not have a meaningful location, `path` is the empty string and all other
363368
// parameters are zero.
364369
not exists(this.getInducingNode()) and

0 commit comments

Comments
 (0)