1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

More inflectoring #1490

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-07-02 19:05:47 +00:00
parent c196db9527
commit da4b15fe18
3 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,6 @@
*SVN*
* Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen, photo => photos #1571, #1583 [foamdino@gmail.com]
* Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen, photo => photos, archive => archives #1571, #1583, #1490 [foamdino@gmail.com/others]
* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails application running in development mode with a ~20KB leak per request #1289 [c.r.mcgrath@gmail.com]

View file

@ -65,6 +65,7 @@ module Inflector
[/(series)$/i, '\1\2'],
[/([^aeiouy]|qu)ies$/i, '\1y'],
[/([^aeiouy]|qu)y$/i, '\1ies'], # query, ability, agency
[/(hive)$/i, '\1s'], # archive, hive
[/(?:([^f])fe|([lr])f)$/i, '\1\2ves'], # half, safe, wife
[/sis$/i, 'ses'], # basis, diagnosis
[/([ti])um$/i, '\1a'], # datum, medium
@ -93,6 +94,7 @@ module Inflector
[/([^aeiouy]|qu)ies$/i, '\1y'],
[/([lr])ves$/i, '\1f'],
[/(tive)s$/i, '\1'],
[/(hive)s$/i, '\1'],
[/([^f])ves$/i, '\1fe'],
[/(^analy)ses$/i, '\1sis'],
[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '\1\2sis'],

View file

@ -27,6 +27,8 @@ class InflectorTest < Test::Unit::TestCase
"agency" => "agencies",
"movie" => "movies",
"archive" => "archives",
"wife" => "wives",
"safe" => "saves",
"half" => "halves",