[Rubygems-developers] Duplicated files in gem

Jim Weirich jim at weirichhouse.org
Fri Jul 2 00:05:13 EDT 2004

Jamis Buck wrote:

> It seems like this could be fixed by calling #uniq! on the @files array 
> in the Gem::Specification#extra_rdoc_files=(extra_rdoc_files) method:

I put the uniq! call into a normalization step called during validation. 
  That allows it to take care of files that are appended to either list 

Thanks for spotting this!  It is fixed in CVS.

> Also, should this method append to the @extra_rdoc_files variable if it 
> already contains file names, rather than replacing them?

No.  The semantics are that assignment replaces.  Appending is done via 
normal list appending operations.

-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list