1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Address NameError: uninitialized constant Digest::UUID::OpenSSL

Follow up #41722

This commit addresses these Active Support test errors.

```ruby
% ruby -v
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin21]
% cd activesupport
% bundle exec ruby -w test/core_ext/digest/uuid_test.rb
Run options: --seed 50574

E

Error:
DigestUUIDExt#test_v3_uuids:
NameError: uninitialized constant Digest::UUID::OpenSSL
    /Users/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/core_ext/digest/uuid.rb:40:in `uuid_v3'
    test/core_ext/digest/uuid_test.rb:8:in `test_v3_uuids'

rails test test/core_ext/digest/uuid_test.rb:7

F

Failure:
DigestUUIDExt#test_invalid_hash_class [test/core_ext/digest/uuid_test.rb:22]:
[ArgumentError] exception expected, not
Class: <NameError>
Message: <"uninitialized constant DigestUUIDExt::OpenSSL">
---Backtrace---
test/core_ext/digest/uuid_test.rb:23:in `block in test_invalid_hash_class'
---------------

rails test test/core_ext/digest/uuid_test.rb:21

E

Error:
DigestUUIDExt#test_v5_uuids:
NameError: uninitialized constant Digest::UUID::OpenSSL
    /Users/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/core_ext/digest/uuid.rb:45:in `uuid_v5'
    test/core_ext/digest/uuid_test.rb:15:in `test_v5_uuids'

rails test test/core_ext/digest/uuid_test.rb:14

Finished in 0.006611s, 453.7891 runs/s, 151.2630 assertions/s.
3 runs, 1 assertions, 1 failures, 2 errors, 0 skips
%
```
This commit is contained in:
Yasuo Honda 2021-07-02 10:04:04 +09:00
parent f263530bf7
commit 08299d1ba4

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true
require "securerandom"
require "openssl"
module Digest
module UUID