Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/ruby/stdlib/digest.rb
Original file line number Diff line number Diff line change
@@ -97,10 +97,9 @@ def base64digest!
# # => LoadError: library not found for class Digest::Foo -- digest/foo
def Digest(name)
const = name.to_sym
Digest::REQUIRE_MUTEX.synchronize {
# Ignore autoload's because it is void when we have #const_missing
Digest.const_missing(const)
}

# Ignore autoload's because it is void when we have #const_missing
Digest.const_missing(const)
rescue LoadError
# Constants do not necessarily rely on digest/*.
if Digest.const_defined?(const)

0 comments on commit 1faa261

Please sign in to comment.