aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/inflections.rb10
-rw-r--r--activesupport/test/inflector_test.rb7
3 files changed, 14 insertions, 5 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 1d86a2a017..fd937adc5a 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 100ad411c3..b40f9cc1eb 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 @@ Inflector.inflections do |inflect|
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 @@ Inflector.inflections do |inflect|
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 4337dfd9d6..620ae6f78e 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",