lib/dry/inflector.rb in dry-inflector-1.0.0 vs lib/dry/inflector.rb in dry-inflector-1.1.0
- old
+ new
@@ -296,10 +296,12 @@
# @return [TrueClass,FalseClass] the result of the check
#
# @since 0.1.0
# @api private
def uncountable?(input)
- input.match?(/\A[[:space:]]*\z/) || inflections.uncountables.include?(input.downcase)
+ input.match?(/\A[[:space:]]*\z/) ||
+ inflections.uncountables.include?(input.downcase) ||
+ inflections.uncountables.include?(input.split(/_|\b/).last.downcase)
end
# @return [String]
#
# @since 0.2.0