[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Buglet in 'gem check --alien'

Han Holl

8/29/2007 9:22:00 AM

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

6 Answers

Eric Hodel

9/9/2007 6:12:00 PM

0

On Aug 29, 2007, at 02:22, Han Holl 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.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars



Jay Levitt

9/10/2007 2:26:00 AM

0

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

> On Aug 29, 2007, at 02:22, Han Holl 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

Eric Hodel

9/10/2007 4:44:00 AM

0

On Sep 9, 2007, at 21:25, Jay Levitt wrote:
> On Mon, 10 Sep 2007 03:11:31 +0900, Eric Hodel wrote:
>> On Aug 29, 2007, at 02:22, Han Holl 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?"

Those punctuation symbols are too hard to reach.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars



Jay Levitt

9/10/2007 4:13:00 PM

0

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

> Those punctuation symbols are too hard to reach.

No superators for you then!

Eric Hodel

9/10/2007 10:17:00 PM

0

On Sep 10, 2007, at 09:15, Jay Levitt wrote:
> On Mon, 10 Sep 2007 13:44:19 +0900, Eric Hodel wrote:
>
>> Those punctuation symbols are too hard to reach.
>
> No superators for you then!

Nope.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars



halong

2/20/2011 3:31:00 PM

0

On Feb 19, 10:16 pm, Mô Tê Rang R?a <moterang....@hotmail.com> wrote:
> Ho^`i truo*'c 1975 ta.i Se`goo`ng c'ac Ha^?u Lo*' Cholon cu~ng dda~
> la`m ra mi` nylon roa`i
>
> Tui co' a(n roa`i ma` may la` kho^ng che^'t
>
> On Feb 19, 8:09 pm, tuna <tu...@nz11.com> wrote:> Ghe^ qua' !!
>
> .> Tha(`ng ta`u che^.t ba^'t ke^? ca'i gi` cho ngu+o+`i tie^u xa`i
> mie^~n
>
> > la`
> > bo.n chu'ng bo? tie^`n va`o tu'i .
> > Ga.o na`y cha(' c chu'ng no' ddi lu+o+.m bao nylong o+? thu`ng ra'c,
> > ro^`i
> > ve^` na^'u la.i tha`nh nhu+.a de?o dde^? la`m ra ga.o gia?
>
> > tuna,
>
> > ------------
> > On Feb 19, 10:32 am, hotac <hochim...@gmail.com> wrote:
>
> > > g?o gi? b?ng nylon dã sang m?,ghé Dallas r?i.
> > > ch?  Vi?tnam ? Cali ch?c có r?i ho?c s?p có dó.
> > > vo g?o xem th? có hai m?u g?o khác nhau chang.
> > > g?o Nh?t trong ch? M?,T?u nó mua h?t r?i.ch? cosco cung th?.
> > > vì v?y,nên ph?i di ch? á dông mua g?o c?a nó.có th? chang ?
> > > Tin dáng tin c?y vì ngu?i g?i tin mua an r?i.Ng?i com khét l?
> > > ngu?i chuy?n tin,  :nguy?n thang cao, 19/2
>
> > > ----- Forwarded Message ----
> > > From: viet ho <vietho...@hotmail.com>
> > > Sent: Fri, February 18, 2011 11:26:14 PM
> > > Subject: [xasupap] G?o gi? dã d?n USA
>
> > >  Gao gia (Fake Rice) lam tu nhua hien gio dang bay ban tai cac cho Tau-
> > > Chinese markets- in Dallas . Nan nhan mua gao gia nay la co con gai
> > > cua minh va 2 nguoi ban nua , gao nau len co mui hoi nong nac giong
> > > nhu la mui nylong bi dot chay va hot gao thi kho cung . That khong ngo
> > > gao gia moi phat hien tuan truoc o China va vai tinh bien gioi o
> > > Vietnam ,bay gio lai duoc bay ban ngang nhien o Dallas .Bon Tau phu
> > > nay that la doc ac da man qua chung .
>
> > > Xin bao tin de ba con biet ma de phong . Va mot tin nua khong kem quan
> > > trong la gao Nhat ban o sieu thi My  Walmart khong con mot hot gao nao
> > > ca ...
>
> > > Chuc may man den tat ca .
>
> > > CucTran
>
> > >http://www.youtube.com/watch?v=vT3JTUCaB_4http://www.chinap.........

wow, gao. gia? dda~ to+'i sa`i go`n

http://www.rfa.org/vietnamese/vietnamnews/Fake-rice-appear-in-hcmc-021920111...