Ruby: remove unused predicate

This commit is contained in:
Harry Maclean
2021-12-17 09:52:04 +13:00
parent dead7a8059
commit eff2136f52

View File

@@ -795,20 +795,6 @@ module ActionDispatch {
bindingset[input]
private string extractAction(string input) { result = input.regexpCapture("[^#]+#(.+)", 1) }
/**
* A basic pluralizer for English strings.
* photo => photos
* story => stories
* TODO: remove?
*/
bindingset[input]
private string pluralize(string input) {
exists(string prefix | prefix = input.regexpCapture("(.*)y", 1) | result = prefix + "ies")
or
not input.regexpMatch(".*y") and
result = input + "s"
}
/**
* The inverse of `pluralize`
* photos => photo