aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-02-10 22:17:30 -0800
committerXavier Noria <fxn@hashref.com>2012-02-10 22:17:30 -0800
commitfd5d9b366c7ad192bbcf5b3c0a774ff684cb9d78 (patch)
treed13322cb630bb6cceea895249b8e4a14445fb468 /activesupport/lib
parentd94e427a92af6ddc44113397b5500ac182479957 (diff)
downloadrails-fd5d9b366c7ad192bbcf5b3c0a774ff684cb9d78.tar.gz
rails-fd5d9b366c7ad192bbcf5b3c0a774ff684cb9d78.tar.bz2
rails-fd5d9b366c7ad192bbcf5b3c0a774ff684cb9d78.zip
fixes a regression introduced by 532cd4, and a bogus test in AP the regression uncovered
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/inflections.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb
index e91289e18f..b3eb1333ca 100644
--- a/activesupport/lib/active_support/inflections.rb
+++ b/activesupport/lib/active_support/inflections.rb
@@ -2,7 +2,7 @@ module ActiveSupport
Inflector.inflections do |inflect|
inflect.plural(/$/, 's')
inflect.plural(/s$/i, 's')
- inflect.plural(/(ax|test)is$/i, '\1es')
+ inflect.plural(/^(ax|test)is$/i, '\1es')
inflect.plural(/(octop|vir)us$/i, '\1i')
inflect.plural(/(octop|vir)i$/i, '\1i')
inflect.plural(/(alias|status)$/i, '\1es')
@@ -40,7 +40,8 @@ module ActiveSupport
inflect.singular(/(bus)(es)?$/i, '\1')
inflect.singular(/(o)es$/i, '\1')
inflect.singular(/(shoe)s$/i, '\1')
- inflect.singular(/(cris|ax|test)(is|es)$/i, '\1is')
+ inflect.singular(/(cris|test)(is|es)$/i, '\1is')
+ inflect.singular(/^(a)x[ie]s$/i, '\1xis')
inflect.singular(/(octop|vir)(us|i)$/i, '\1us')
inflect.singular(/(alias|status)(es)?$/i, '\1')
inflect.singular(/^(ox)en/i, '\1')