Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more exceptions on pluralization for -fe/-ve endings #15740

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions activesupport/lib/active_support/inflections.rb
Expand Up @@ -56,7 +56,13 @@ module ActiveSupport
inflect.irregular('man', 'men')
inflect.irregular('child', 'children')
inflect.irregular('sex', 'sexes')

# Ends with -fe exceptions
inflect.irregular('move', 'moves')
inflect.irregular('olive', 'olives')
inflect.irregular('glove', 'gloves')
inflect.irregular('safe', 'safes')

inflect.irregular('cow', 'kine')
inflect.irregular('zombie', 'zombies')

Expand Down
5 changes: 4 additions & 1 deletion activesupport/test/inflector_test_cases.rb
Expand Up @@ -27,7 +27,7 @@ module InflectorTestCases
"index" => "indices",

"wife" => "wives",
"safe" => "saves",
"safe" => "safes",
"half" => "halves",

"move" => "moves",
Expand Down Expand Up @@ -101,6 +101,9 @@ module InflectorTestCases
"rice" => "rice",
"shoe" => "shoes",

"olive" => "olives",
"glove" => "gloves",

"horse" => "horses",
"prize" => "prizes",
"edge" => "edges",
Expand Down