diff options
author | George Claghorn <george@basecamp.com> | 2018-01-16 09:20:47 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-01-16 09:20:47 -0500 |
commit | 4c0cb1c2c9269c74588da9f114f52ea3707ae8fb (patch) | |
tree | 41f47db13ca943c96c8e532f0e87eadc548fcc5d /activesupport/lib | |
parent | c2ba530c43244b5b60fd629f61cd8b44c43ecda9 (diff) | |
download | rails-4c0cb1c2c9269c74588da9f114f52ea3707ae8fb.tar.gz rails-4c0cb1c2c9269c74588da9f114f52ea3707ae8fb.tar.bz2 rails-4c0cb1c2c9269c74588da9f114f52ea3707ae8fb.zip |
Fix constant reference
Update the long key handling test so it triggers truncation in the Redis cache store.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/redis_cache_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/redis_cache_store.rb b/activesupport/lib/active_support/cache/redis_cache_store.rb index 6cc45f5284..e7f015bff5 100644 --- a/activesupport/lib/active_support/cache/redis_cache_store.rb +++ b/activesupport/lib/active_support/cache/redis_cache_store.rb @@ -368,7 +368,7 @@ module ActiveSupport def truncate_key(key) if key.bytesize > max_key_bytesize - suffix = ":sha2:#{Digest::SHA2.hexdigest(key)}" + suffix = ":sha2:#{::Digest::SHA2.hexdigest(key)}" truncate_at = max_key_bytesize - suffix.bytesize "#{key.byteslice(0, truncate_at)}#{suffix}" else |