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

Already on GitHub? Sign in to your account

Fix inflection regexes for mouse, mice #3901

Merged
merged 1 commit into from Dec 8, 2011

Conversation

Projects
None yet
3 participants
Contributor

mark-rushakoff commented Dec 8, 2011

The regexes were previously (similar to) /([m|l])ouse$/. The square brackets treat the | as a literal character to match, so if anyone tried to e.g. pluralize |ouse they would receive |ice.

The author's intent was obviously to use (m|l) without treating | as a special character, so that is what this patch does.

Member

vijaydev commented Dec 8, 2011

Nothing about the patch, but why will anyone pluralize |ouse ?!

Contributor

mark-rushakoff commented Dec 8, 2011

@vijaydev I don't know, but when I spotted the bug I couldn't not fix it...

And it wouldn't have to be |ouse exactly, it could be foo|ouse, which is still admittedly a strange pattern to be pluralizing.

josevalim added a commit that referenced this pull request Dec 8, 2011

@josevalim josevalim merged commit 0144f4f into rails:master Dec 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment