aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-09-26 04:26:59 +0930
committerGitHub <noreply@github.com>2017-09-26 04:26:59 +0930
commit5e56d2bcabf9ddbac43e3bda3ed6190db640bafd (patch)
treec04096052fa7a55d7e00865915b94678ef6c0e20
parent6e61af131d17d3d076a0b000d0d67d6846efc094 (diff)
parentff56fdb08d643b8d9892763c4b9731e0391260fd (diff)
downloadrails-5e56d2bcabf9ddbac43e3bda3ed6190db640bafd.tar.gz
rails-5e56d2bcabf9ddbac43e3bda3ed6190db640bafd.tar.bz2
rails-5e56d2bcabf9ddbac43e3bda3ed6190db640bafd.zip
Merge pull request #30705 from frodsan/use-digest-thread-safe
Preload digest/sha2 to avoid thread safe error.
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb2
-rw-r--r--activesupport/lib/active_support/security_utils.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index c9607df28c..4f0c1890be 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -2,7 +2,7 @@
require_relative "../../migration/join_table"
require "active_support/core_ext/string/access"
-require "digest"
+require "digest/sha2"
module ActiveRecord
module ConnectionAdapters # :nodoc:
diff --git a/activesupport/lib/active_support/security_utils.rb b/activesupport/lib/active_support/security_utils.rb
index 51870559ec..b6b31ef140 100644
--- a/activesupport/lib/active_support/security_utils.rb
+++ b/activesupport/lib/active_support/security_utils.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require "digest"
+require "digest/sha2"
module ActiveSupport
module SecurityUtils