Buglet in 'gem check --alien'

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 H.

On Aug 29, 2007, at 02:22, Han H. wrote:

Hello,

Running ‘gem check --alien’ will fail if there is a gem installed with
an empty file, like actionmailer-1.3.3 and others.

File a bug in the tracker. Bug reports filed by email will be ignored.

On Mon, 10 Sep 2007 03:11:31 +0900, Eric H. wrote:

On Aug 29, 2007, at 02:22, Han H. wrote:

Hello,

Running ‘gem check --alien’ will fail if there is a gem installed with
an empty file, like actionmailer-1.3.3 and others.

File a bug in the tracker. Bug reports filed by email will be ignored.

I think you meant:

“Thanks for finding that! Could you file a bug in the tracker?”

Jay

On Sep 9, 2007, at 21:25, Jay L. wrote:

ignored.

I think you meant:

“Thanks for finding that! Could you file a bug in the tracker?”

Those punctuation symbols are too hard to reach.

On Sep 10, 2007, at 09:15, Jay L. wrote:

On Mon, 10 Sep 2007 13:44:19 +0900, Eric H. wrote:

Those punctuation symbols are too hard to reach.

No superators for you then!

Nope.

On Mon, 10 Sep 2007 13:44:19 +0900, Eric H. wrote:

Those punctuation symbols are too hard to reach.

No superators for you then!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs