class ActionDispatch::Http::ParameterFilter::CompiledFilter
def self.compile(filters)
def self.compile(filters) return lambda { |params| params.dup } if filters.empty? strings, regexps, blocks = [], [], [] filters.each do |item| case item when Proc blocks << item when Regexp regexps << item else strings << item.to_s end end regexps << Regexp.new(strings.join('|'), true) unless strings.empty? new regexps, blocks end