Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digest is not threadsafe #20

Closed
dentarg opened this issue Dec 8, 2014 · 0 comments
Closed

Digest is not threadsafe #20

dentarg opened this issue Dec 8, 2014 · 0 comments
Labels

Comments

@dentarg
Copy link
Collaborator

dentarg commented Dec 8, 2014

In twingly/zambezi#159 we encountered the error

RuntimeError: Digest::Base cannot be directly inherited in Ruby

Google led me to chef/chef#1793 which states:

After some debugging we've pinpointed this error to Digest not being threadsafe.

@dentarg dentarg added the bug label Dec 8, 2014
jage added a commit that referenced this issue Jun 4, 2015
I'm defining the hashers in constants to avoid any performance overhead
by the mutex since we hash a lot of URLs

Digest() is only thread safe in Ruby 2.2.0 and newer. Patch:
ruby/ruby@c02fa39

I tried creating a test for this, but it's hard to provoke the error
with the old code to verify the test.

Closes #20
@jage jage closed this as completed in #32 Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant