aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/inflections.rb2
-rw-r--r--activesupport/test/inflector_test.rb2
3 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 2999f75c7f..e0296914fc 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Inflections: MatrixTest -> MatrixTests instead of MatricesTest. #8496 [jbwiv]
+
* Multibyte strings respond_to the String methods they proxy so they can be duck-typed. #6549 [Tuxie]
* Array#to_xml yields the builder just like Hash and ActiveRecord::Base. #8472 [seth]
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb
index 8f3f8618cc..f53ef53ca4 100644
--- a/activesupport/lib/active_support/inflections.rb
+++ b/activesupport/lib/active_support/inflections.rb
@@ -12,7 +12,7 @@ Inflector.inflections do |inflect|
inflect.plural(/(hive)$/i, '\1s')
inflect.plural(/([^aeiouy]|qu)y$/i, '\1ies')
inflect.plural(/(x|ch|ss|sh)$/i, '\1es')
- inflect.plural(/(matr|vert|ind)ix|ex$/i, '\1ices')
+ 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')
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 3aff541646..9849e0b52b 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -45,6 +45,7 @@ class InflectorTest < Test::Unit::TestCase
"basis" => "bases",
"diagnosis" => "diagnoses",
+ "diagnosis_a" => "diagnosis_as",
"datum" => "data",
"medium" => "media",
@@ -92,6 +93,7 @@ class InflectorTest < Test::Unit::TestCase
"vertex" => "vertices",
"matrix" => "matrices",
+ "matrix_fu" => "matrix_fus",
"axis" => "axes",
"testis" => "testes",