Skip to content

Commit

Permalink
Ruby 2.2 doesn't support Safe Navigation Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kamipo committed May 18, 2020
1 parent 9b575d5 commit a884420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/cache/redis_cache_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def set_redis_capabilities
# Read an entry from the cache.
def read_entry(key, options = nil)
failsafe :read_entry do
raw = options&.fetch(:raw, false)
raw = options && options.fetch(:raw, false)
deserialize_entry(redis.with { |c| c.get(key) }, raw: raw)
end
end
Expand All @@ -336,7 +336,7 @@ def read_multi_entries(names, _options)
def read_multi_mget(*names)
options = names.extract_options!
options = merged_options(options)
raw = options&.fetch(:raw, false)
raw = options && options.fetch(:raw, false)

keys = names.map { |name| normalize_key(name, options) }

Expand Down

0 comments on commit a884420

Please sign in to comment.