Skip to content
Browse files

Lazy-require OpenSSL

  • Loading branch information...
1 parent c26cb08 commit 51d155e6971acef7fee87cb5e218e05cb87d8f57 @jeremy jeremy committed Nov 23, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/message_verifier.rb
View
3 activesupport/lib/active_support/message_verifier.rb
@@ -39,7 +39,8 @@ def generate(value)
private
def generate_digest(data)
+ require 'openssl' unless defined?(OpenSSL)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, data)
end
end
-end
+end

0 comments on commit 51d155e

Please sign in to comment.
Something went wrong with that request. Please try again.