Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Created December 28, 2009 14:09
Show Gist options
  • Save cloudhead/264687 to your computer and use it in GitHub Desktop.
Save cloudhead/264687 to your computer and use it in GitHub Desktop.
@@ -3,7 +3,14 @@ module ActiveSupport
inflect.plural(/$/, 's')
inflect.plural(/s$/i, 's')
inflect.plural(/(ax|test)is$/i, '\1es')
- inflect.plural(/(octop|vir)us$/i, '\1i')
+
+ # Note that 'octopuses' is equally correct
+ inflect.plural(/(octop)us$/i, '\1i')
+
+ # The correct plural of 'virus' is actually 'viruses',
+ # not 'viri' or 'virii', like one would like to be believe.
+ # See: http://en.wikipedia.org/wiki/Plural_form_of_words_ending_in_-us#Virus
+ inflect.plural(/(virus)$/i, '\1es')
inflect.plural(/(alias|status)$/i, '\1es')
inflect.plural(/(bu)s$/i, '\1ses')
inflect.plural(/(buffal|tomat)o$/i, '\1oes')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment