Hello,

Running 'gem check --alien' will fail if there is a gem installed with
an empty file, like actionmailer-1.3.3 and others.
The problem is in rubygems/validator.rb:

  format.file_entries.each do |entry, data|
    # Found this file.  Delete it from list
    installed_files.delete remove_leading_dot_dir(entry['path'])
    File.open(File.join(gem_directory, entry['path']), 'rb') do |f|
      unless Gem::MD5.hexdigest(f.read).to_s == Gem::MD5.hexdigest(data).to_s
        errors[gem_name] << ErrorData.new(entry['path'], "installed
file doesn't match original from gem")
      end
    end
  end

An empty file will produce data as nil, which leads to a TypeError on
the hexdigest(data).
Adding 'data='' if data.nil?' helps, but may not be the best solution.

Cheers,

Han Holl