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

Changes "if secret.nil?" to unless secret in MessageVerfier

This commit is contained in:
Kostiantyn Kahanskyi 2014-09-12 18:47:33 +02:00
parent 4bf9d1938b
commit 1ac20c59f3

View file

@ -27,7 +27,7 @@ module ActiveSupport
class InvalidSignature < StandardError; end
def initialize(secret, options = {})
raise ArgumentError, 'Secret should not be nil.' if secret.nil?
raise ArgumentError, 'Secret should not be nil.' unless secret
@secret = secret
@digest = options[:digest] || 'SHA1'
@serializer = options[:serializer] || Marshal