TypeError in Ruby 2.2.0 and later
As of Ruby 2.2.0, digest-sha3 v1.0.2 now produces a TypeError. The problem also occurs in the current 2.3.0-dev build.
The problem doesn't occur in earlier versions of Ruby (verified: 1.9.3-p448, 2.0.0-p451, 2.1.2, 2.1.5).
Example:
2.2.0> require 'digest/sha3'
=> true
2.2.0> Digest::SHA3.digest("foo")
TypeError: wrong argument type Digest::SHA3 (expected digest)
from (irb):2:in `reset'
from (irb):2:in `digest'
from (irb):2:in `digest'
from (irb):2
from /Users/bbuckley/.cache/rbenv/versions/2.2.0/bin/irb:11:in `<main>'
:+1:
+1
+1
I am no longer maintaining this gem. If someone would like to take over maintenance, please let me know.
Trying to take up this torch here as we've been using this gem and moving to sha2 digests requires a massive change across a lot of affected systems. Anybody good with C extensions? I'm a bit baffled by the particular error as it seems to be coming from Digest itself and not this library.
https://github.com/phusion/digest-sha3-ruby/pull/4 will fix this issue. New version of the gem requires 2.2.x.
@FooBarWidget if you can make me contributor. I can take some maintenance from here. Preferably we could make a PR and get this into ruby 2.3.0. I can ask Nobu if he'd like an implementation of sha3 in future versions of ruby.
Poke
My PR was merged. You can close this issue @brandt .
Hurray! :+1: