Skip to content

Commit a298a39

Browse files
authored
Merge pull request github#15473 from github/koesie10/ruby-model-only-public-methods
Ruby: Only generate models for public methods
2 parents f3eac55 + 0442631 commit a298a39

File tree

1 file changed

+1
-0
lines changed
  • ruby/ql/src/queries/modeling/internal

1 file changed

+1
-0
lines changed

ruby/ql/src/queries/modeling/internal/Util.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ string getArgumentPath(DataFlow::ParameterNode paramNode) {
4343
*/
4444
predicate pathToMethod(DataFlow::MethodNode method, string type, string path) {
4545
method.getLocation().getFile() instanceof RelevantFile and
46+
method.isPublic() and // only public methods are modeled
4647
exists(DataFlow::ModuleNode mod, string methodName |
4748
method = mod.getOwnInstanceMethod(methodName) and
4849
if methodName = "initialize"

0 commit comments

Comments
 (0)