diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 1d86a2a017a8cd22995a0516e7f3ffd4adac16c9..fd937adc5a8e05a2ab8c463a8e9c7d6ced2fe902 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed inflections for status, quiz, move #2056 [deirdre@deirdre.net] + * Added Hash#reverse_merge, Hash#reverse_merge!, and Hash#reverse_update to ease the use of default options * Added Array#to_sentence that'll turn ['one', 'two', 'three'] into "one, two, and three" #2157 [m.stienstra@fngtps.com] diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index 100ad411c3c9d2865cecb0613557b73609abae77..b40f9cc1eb1a5b8f3654d77c57ec86d352486bfc 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/activesupport/lib/active_support/inflections.rb @@ -1,9 +1,9 @@ Inflector.inflections do |inflect| inflect.plural /$/, 's' inflect.plural /s$/i, 's' - inflect.plural /(ax|cri|test)is$/i, '\1es' + inflect.plural /(ax|test)is$/i, '\1es' inflect.plural /(octop|vir)us$/i, '\1i' - inflect.plural /(alias)/i, '\1es' + inflect.plural /(alias|status)/i, '\1es' inflect.plural /(bu)s$/i, '\1ses' inflect.plural /(buffal|tomat)o$/i, '\1oes' inflect.plural /([ti])um$/i, '\1a' @@ -16,10 +16,10 @@ inflect.plural /(matr|vert|ind)ix|ex$/i, '\1ices' inflect.plural /([m|l])ouse$/i, '\1ice' inflect.plural /^(ox)$/i, '\1en' + inflect.plural /(quiz)$/i, '\1zes' inflect.singular /s$/i, '' inflect.singular /(n)ews$/i, '\1ews' - inflect.singular /(s)tatus$/i, '\1tatus' inflect.singular /([ti])a$/i, '\1um' inflect.singular /((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '\1\2sis' inflect.singular /(^analy)ses$/i, '\1sis' @@ -37,15 +37,17 @@ inflect.singular /(shoe)s$/i, '\1' inflect.singular /(cris|ax|test)es$/i, '\1is' inflect.singular /([octop|vir])i$/i, '\1us' - inflect.singular /(alias)es$/i, '\1' + inflect.singular /(alias|status)es$/i, '\1' inflect.singular /^(ox)en/i, '\1' inflect.singular /(vert|ind)ices$/i, '\1ex' inflect.singular /(matr)ices$/i, '\1ix' + inflect.singular /(quiz)zes$/i, '\1' inflect.irregular 'person', 'people' inflect.irregular 'man', 'men' inflect.irregular 'child', 'children' inflect.irregular 'sex', 'sexes' + inflect.irregular 'move', 'moves' inflect.uncountable %w( equipment information rice money species series fish sheep ) end \ No newline at end of file diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 4337dfd9d6dcb68352a99c5a9ba0219c42358cc4..620ae6f78e4a4e83ee68d93d152fa04e09683ac0 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -35,6 +35,8 @@ class InflectorTest < Test::Unit::TestCase "safe" => "saves", "half" => "halves", + "move" => "moves", + "salesperson" => "salespeople", "person" => "people", @@ -65,6 +67,8 @@ class InflectorTest < Test::Unit::TestCase "series" => "series", "species" => "species", + "quiz" => "quizzes", + "perspective" => "perspectives", "ox" => "oxen", @@ -75,7 +79,8 @@ class InflectorTest < Test::Unit::TestCase "elf" => "elves", "information" => "information", "equipment" => "equipment", - "bus" => "buses", + "bus" => "buses", + "status" => "statuses", "mouse" => "mice", "louse" => "lice",