class ActiveSupport::Inflector::Inflections::Uncountables

def <<(*word)

def <<(*word)
  add(word)
end

def add(words)

def add(words)
  words = words.flatten.map(&:downcase)
  concat(words)
  @regex_array += words.map { |word| to_regex(word) }
  self
end

def delete(entry)

def delete(entry)
  super entry
  @regex_array.delete(to_regex(entry))
end

def initialize

def initialize
  @regex_array = []
  super
end

def to_regex(string)

def to_regex(string)
  /\b#{::Regexp.escape(string)}\Z/i
end

def uncountable?(str)

def uncountable?(str)
  @regex_array.any? { |regex| regex.match? str }
end