def sanitize(cov)
      ncov = {}
      cov.each do |path, runs|
        if runs.is_a?(Array)
          ncov[path] = runs
          next
        end

        ncov[path] = {}
        ncov[path][:lines] = runs[:lines] if runs[:lines]
        ncov[path][:branches] = runs[:branches] if runs[:branches]

        if runs[:methods]
          ncov[path][:methods] = methods = {}
          runs[:methods].each do |mthd, run|
            klass =
              begin
                Marshal.dump(mthd[0])
                mthd[0]
              rescue
                mthd[0].to_s
              end
            methods[[klass] + mthd.drop(1)] = run
          end
        end
      end
      ncov
    end
def sanitize(cov)
      ncov = {}
      cov.each do |path, runs|
        if runs.is_a?(Array)
          ncov[path] = runs
          next
        end

        ncov[path] = {}
        ncov[path][:lines] = runs[:lines] if runs[:lines]
        ncov[path][:branches] = runs[:branches] if runs[:branches]

        if runs[:methods]
          ncov[path][:methods] = methods = {}
          runs[:methods].each do |mthd, run|
            klass =
              begin
                Marshal.dump(mthd[0])
                mthd[0]
              rescue
                mthd[0].to_s
              end
            methods[[klass] + mthd.drop(1)] = run
          end
        end
      end
      ncov
    end
Make the covearge result able to marshal.