mirror of https://github.com/rails/rails
Fix Active Support test warnings
The namespace ivar needs a definition check to not warn on Ruby 2.7
This commit is contained in:
parent
d64acfdcac
commit
e67b8d0dcc
|
@ -77,7 +77,7 @@ module CacheLoggingBehavior
|
|||
assert_match pattern, io.string
|
||||
end
|
||||
|
||||
def key_pattern(key, namespace: @namespace)
|
||||
def key_pattern(key, namespace: defined?(@namespace) && @namespace)
|
||||
/#{Regexp.escape namespace.to_s}#{":" if namespace}#{Regexp.escape key}/
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue