Skip to content

Commit 8262247

Browse files
committed
Minor simplification of finderMethodName predicate
1 parent eb8c48d commit 8262247

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ql/lib/codeql/ruby/frameworks/ActiveRecord.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private string finderMethodName() {
262262
"fifth", "find", "find_by", "find_or_initialize_by", "find_or_create_by", "first",
263263
"forty_two", "fourth", "last", "second", "second_to_last", "take", "third", "third_to_last"
264264
] and
265-
(result = baseName or result = baseName + "!")
265+
result = baseName + ["", "!"]
266266
)
267267
or
268268
result = "new"

0 commit comments

Comments
 (0)