Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: copying letter casing after inflecting in English

  • Loading branch information...
commit d5c9b42934d2139d524e65fef4e635e64795c971 1 parent f99f13c
Paul Engel authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rich/pluralization/inflector.rb
View
4 lib/rich/pluralization/inflector.rb
@@ -14,11 +14,11 @@ def inflections(locale = nil)
end
def singularize(word)
- in_english? ? word.singularize : inflect(:singulars, word)
+ in_english? ? word.singularize.cp_case(word) : inflect(:singulars, word)
end
def pluralize(word, count = nil)
- count == 1 ? singularize(word) : (in_english? ? word.pluralize : inflect(:plurals, word))
+ count == 1 ? singularize(word) : (in_english? ? word.pluralize.cp_case(word) : inflect(:plurals, word))
end
private
Please sign in to comment.
Something went wrong with that request. Please try again.