[Rubygems-developers] Updates to RubyGems

Jim Weirich jim at weirichhouse.org
Mon Sep 18 14:22:57 EDT 2006


Several people at Euro RailsConf talked to me about a couple patches to 
RubyGem.  I've incorporated the following two:

* Memory reduction.

Steve Longdo did some research into an issue where multiple 
Gem::GemSearchPath objects were being created, possibly in different 
threads.  He suggested turning the class into a singleton (to avoid 
multiples), but I tend to avoid singleton.  My alternative solution was 
to put a Mutex around the creation of the search path object to avoid 
race conditions from multiple threads.

* Specification comparison errors.

This is an issue that is really impacting the JRuby team.  It seems that 
Gem::Specification equals operator is poorly written in that it blows up 
if compared to a non-specification object.  I don't think the RubyGems 
code ever explicity does this, but the JRuby folk think that it might be 
related to Marsh activity (we do store our cache in marshal format). 
Also, if the == operator is defined, a compatible hash should be defined 
as well.  I have fixed the Specification, Version and Requirements 
classes, and have updated the unit tests to cover those issue.

You can update to this beta version with:

    sudo gem update --system --source http://onestepback.org/betagems

The second issue is rather hot for the JRuby team and I would like to 
make a new minor release soon.  I know there are several patches I 
haven't gotten around to yet, but if there are other hot issues for 
RubyGems that should be addressed, give a hollar now.

Thanks.

-- Jim Weirich



More information about the Rubygems-developers mailing list