Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84ae17d commit 0ffb0f6Copy full SHA for 0ffb0f6
1 file changed
ruby/ql/lib/codeql/ruby/ast/internal/Module.qll
@@ -408,12 +408,8 @@ private module ResolveImpl {
408
string getAnAssumedGlobalConst() {
409
exists(ConstantAccess access |
410
not exists(access.getScopeExpr()) and
411
- result = access.getName()
412
- |
413
- access.hasGlobalScope()
414
- or
415
- // At the top-level but not inside a block
416
- enclosingModuleNoBlock(access) instanceof Toplevel
+ result = access.getName() and
+ isToplevel(access)
417
)
418
}
419
0 commit comments