Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5
-
Fix Version/s: JRuby 1.6RC1
-
Component/s: Standard Library
-
Labels:None
-
Environment:OS X 10.5.6, rvm + jruby 1.5.0
-
Number of attachments :
Description
When trying to use a Digest::Class extension (specifically Ruby 1.9's pure ruby implementation of Digest::HMAC) we get an argument error because Digest::HMAC.digest throws an ArgumentError.
The reason is that Digest::Class.digest should accept a variable number of arguments that get passed to the Digest::Class's initialize (see http://ruby-doc.org/stdlib/libdoc/digest/rdoc/classes/Digest/Class.html#M000450)
I believe the issue is L362 here: http://gist.github.com/406400
This tiny patch solves the problem.
On the other hand, I've seen that the ruby core has a test file for Digest that we don't include: test/digest/test_digest_extend.rb
I don't want to send a patch to include it
and I don't know how the external tests have been syncronized right now, by hand I suspect. We could use the same way the stdlib is syncronizing now with the cloned repositories.