# File lib/rspec/core/metadata.rb, line 178
      def filter_applies?(key, value, metadata=self)
        return metadata.filter_applies_to_any_value?(key, value) if Array === metadata[key] && !(Proc === value)
        return metadata.line_number_filter_applies?(value)       if key == :line_numbers
        return metadata.location_filter_applies?(value)          if key == :locations
        return metadata.filters_apply?(key, value)               if Hash === value

        return false unless metadata.has_key?(key)

        case value
        when Regexp
          metadata[key] =~ value
        when Proc
          case value.arity
          when 0 then value.call
          when 2 then value.call(metadata[key], metadata)
          else value.call(metadata[key])
          end
        else
          metadata[key].to_s == value.to_s
        end
      end