Skip to content

Commit

Permalink
Slightly better pluralize
Browse files Browse the repository at this point in the history
  • Loading branch information
presidentbeef committed Jul 16, 2021
1 parent 2a82609 commit f1378ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/brakeman/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def underscore camel_cased_word

# stupid simple, used to delegate to ActiveSupport
def pluralize word
word + "s"
if word.end_with? 's'
word + 'es'
else
word + 's'
end
end

#Returns a class name as a Symbol.
Expand Down

0 comments on commit f1378ae

Please sign in to comment.