This project is archived and is in readonly mode.

#2407 ✓wontfix
Paul Campbell

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

Reported by Paul Campbell | April 3rd, 2009 @ 12:35 PM | in 2.x

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

Comments and changes to this ticket

  • CancelProfileIsBroken

    CancelProfileIsBroken May 17th, 2009 @ 02:13 PM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages