aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
committerXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
commit4c4fd1a60ff1c060e76e9ee540074756510f53ea (patch)
tree77da1c66c127e36c8b00825b676d9267a9ef4cd6 /activesupport/lib/active_support/inflector
parent03cb74b9461293b96ae0add8ff5efda132dabba0 (diff)
parentaf130575249571464ec984efa84fcea1267e8cf8 (diff)
downloadrails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.gz
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.bz2
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.zip
Merge commit 'rails/master'
Diffstat (limited to 'activesupport/lib/active_support/inflector')
-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) }