[Rubygems-developers] Fixed warnings and functional test

Jim Weirich jim at weirichhouse.org
Sun Apr 25 04:03:55 EDT 2004

I fixed a number of warnings in CVS.  The major one was the redefinition 
of several methods in specification.rb.  The methods were defined as 
attributes, and then redefined.  This causes a warning when run with -w 
(which is how rake is run).  I just added an undef command right before 
each redefinition.

Another odd warning was the complaint about @gem_path and @gem_home not 
being initialized before used in a statement like ...

     set_paths(ENV['GEM_PATH']) unless @gem_path

I fixed this by adding a '@gem_path ||= nil' before the offending 
statements.  This seems wrong somehow.  If someone has a better fix, go 
ahead and apply it.  But at least the warnings are gone.

Oh, and I fixed a functional test that looked for a gem with the "-ruby" 
in it.  Since the gem naming scheme was changed, the functional test was 
wrong.  Don't forget to check the functional tests as well as the unit 
tests before committing (like I did recently :-/ )

I still have one unit test failing for the remote installer, but now it 
gives a different error than before.  I need to take a closer look at it.

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