mirror of https://github.com/rails/rails
Merge pull request #51476 from marvinthepa/no_anonymous_block_parameter
Fix "no anonymous block parameter" in ruby 3.1
This commit is contained in:
commit
b8460800aa
|
@ -174,8 +174,8 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Enable the query cache within the block.
|
||||
def cache(&)
|
||||
pool.enable_query_cache(&)
|
||||
def cache(&block)
|
||||
pool.enable_query_cache(&block)
|
||||
end
|
||||
|
||||
def enable_query_cache!
|
||||
|
@ -186,8 +186,8 @@ module ActiveRecord
|
|||
#
|
||||
# Set <tt>dirties: false</tt> to prevent query caches on all connections from being cleared by write operations.
|
||||
# (By default, write operations dirty all connections' query caches in case they are replicas whose cache would now be outdated.)
|
||||
def uncached(dirties: true, &)
|
||||
pool.disable_query_cache(dirties: dirties, &)
|
||||
def uncached(dirties: true, &block)
|
||||
pool.disable_query_cache(dirties: dirties, &block)
|
||||
end
|
||||
|
||||
def disable_query_cache!
|
||||
|
|
Loading…
Reference in New Issue