aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/digest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/digest.rb')
-rw-r--r--activesupport/lib/active_support/digest.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/digest.rb b/activesupport/lib/active_support/digest.rb
index d77eeb072b..fba10fbdcf 100644
--- a/activesupport/lib/active_support/digest.rb
+++ b/activesupport/lib/active_support/digest.rb
@@ -13,16 +13,8 @@ module ActiveSupport
end
def hexdigest(arg)
- new.hexdigest(arg)
+ hash_digest_class.hexdigest(arg)[0...32]
end
end
-
- def initialize(digest_class: nil)
- @digest_class = digest_class || self.class.hash_digest_class
- end
-
- def hexdigest(arg)
- @digest_class.hexdigest(arg).truncate(32)
- end
end
end