aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector/inflections.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/inflector/inflections.rb')
-rw-r--r--activesupport/lib/active_support/inflector/inflections.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/inflections.rb b/activesupport/lib/active_support/inflector/inflections.rb
index 785e245ea4..3caf78bc7d 100644
--- a/activesupport/lib/active_support/inflector/inflections.rb
+++ b/activesupport/lib/active_support/inflector/inflections.rb
@@ -148,7 +148,7 @@ module ActiveSupport
def singularize(word)
result = word.to_s.dup
- if inflections.uncountables.include?(result.downcase)
+ if inflections.uncountables.any? { |inflection| result =~ /#{inflection}\Z/i }
result
else
inflections.singulars.each { |(rule, replacement)| break if result.gsub!(rule, replacement) }