[Rubygems-developers] [rubygems] Build broken by chadfowler (#1221)

Jim Weirich jim.weirich at gmail.com
Mon Mar 26 00:20:42 EDT 2007


The source_index.rb file was changed to use hexdigest, but in doing so
caused the following errors:

>   1) Error:
> test_index_signature(TestSourceIndex):
> ArgumentError: wrong number of arguments (1 for 0)
>     ./lib/rubygems/source_index.rb:177:in `hexdigest'
>     ./lib/rubygems/source_index.rb:177:in `index_signature'
>     ./test/test_source_index.rb:174:in `test_index_signature'
>
>   2) Error:
> test_signature(TestSourceIndex):
> ArgumentError: wrong number of arguments (1 for 0)
>     ./lib/rubygems/source_index.rb:182:in `hexdigest'
>     ./lib/rubygems/source_index.rb:182:in `gem_signature'
>     ./test/test_source_index.rb:162:in `test_signature'

The line in question is:

      Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s

Is there any reason this shouldn't read:

      Digest::SHA256.new(@gems[gem_full_name].to_yaml).hexdigest

???

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