rails/rails — pull request #13993 by tjmw (2014-02-09 11:35:44+00:00)
Title: Fix general singularization rule for words ending in "aves"

For example "waves" => "wave", "caves" => "cave", "slaves" => "slave".

There's an existing test for an exception to this rule: "safe" => "saves". I'm a little unsure about that inflection (I would have thought "save" => "saves" and "safe" => "safes") but I've left this functionality in place.

Related to this, the following rule exists for singularizing:

`inflect.singular(/([^f])ves$/i, '\1fe')`

I'm not sure what the purpose of the `[^f]` is here. I can't find any words which end "fves" and
`$ ack "fves$" /usr/share/dict/words`
returns nothing.

Still, doesn't mean there isn't one! It would be great to add a test case for the scenario this is here to cover if anyone knows?

Thanks!