Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Inflector singularising "loves" to "lofe", but pluralizing "love" to "loves"

#2407

I've found an inconsistency in the Inflection library with a few words ending in 'ove'


"love".pluralize => "loves"
"loves".singularize => "lofe"

"glove".pluralize => "gloves"
"gloves".singularize => "glofe"

The inflector as it stands is there to support words like "half", "safe", "wife" ... however, all three of these are consistent between singularize and pluralize.

I got turned away from submitting a patch based on a message in active_support/inflector.rb:

# The Rails core team has stated patches for the inflections library will not be accepted # in order to avoid breaking legacy applications which may be relying on errant inflections. # If you discover an incorrect inflection and require it for your application, you'll need # to correct it yourself (explained below).

However, this seems to me to be more than a case of an errant / incorrect inflection ... and I can't imagine too many apps relying on an inconsistency between singularize and pluralize.

I've created a pre-emptive patch that fixes the issue

Reported by Paul Campbell · April 3rd, 2009 @ 12:35 PM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from new to wontfix

    And, alas, the comment is correct. Despite the nagging inconsistencies in the inflector, what we have is what we have until such time as there's a complete rewrite.

    May 17th, 2009 @ 02:13 PM