Found unused variable `expires` at lib/secure_session.rb, it seem like a mistake

found unused variable expires at lib/secure_session.rb, it seem like a mistake

def set(key, val, expires: nil)
    expires ||= SecureSession.expiry
    $redis.setex(prefixed_key(key), SecureSession.expiry.to_i, val.to_s)
    true
  end
5 Likes

@sam Should it be $redis.setex(prefixed_key(key), expires.to_i, val.to_s)? Looks like the specs don’t fail because they use the default value of 1 hour.

1 Like

Nice catch, yeah @gerhard that sounds right, fixed. Nice catch @coocooooo

2 Likes