# File lib/guard/watcher.rb, line 44
    def self.match_files(guard, files)
      guard.watchers.inject([]) do |paths, watcher|
        files.each do |file|
          if matches = watcher.match_file?(file)
            if watcher.action
              result = watcher.call_action(matches)
              if guard.options[:any_return]
                paths << result 
              elsif result.respond_to?(:empty?) && !result.empty?
                paths << Array(result)
              end
            else
              paths << matches[0]
            end
          end
        end
        
        guard.options[:any_return] ? paths : paths.flatten.map { |p| p.to_s }
      end
    end