# File lib/rpm/db.rb, line 105
    def self.each
      DB.open do |db|
        it = MatchIterator.from_ptr(RPM::C.rpmdbInitIterator(db.ptr, 0, nil, 0))
        if block_given?
          it.each do |pkg|
            yield pkg
          end
        end
      end
    end