# File lib/buildr/core/filter.rb, line 212
    def pattern_match(file, pattern)
      case
      when pattern.is_a?(Regexp)
        return file.match(pattern)
      when pattern.is_a?(String)
        return File.fnmatch(pattern, file)
      when pattern.is_a?(Proc)
        return pattern.call(file)
      when pattern.is_a?(Rake::FileTask)
        return pattern.to_s.match(file)
      else
        raise "Cannot interpret pattern #{pattern}"
      end
    end