mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix warning: shadowing outer local variable
This fixes following warnings: ``` actionpack/lib/action_dispatch/middleware/debug_locks.rb:46: warning: shadowing outer local variable - threads ```
This commit is contained in:
parent
8536ebeefa
commit
fe4753fac8
1 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ module ActionDispatch
|
||||||
|
|
||||||
private
|
private
|
||||||
def render_details(req)
|
def render_details(req)
|
||||||
threads = ActiveSupport::Dependencies.interlock.raw_state do |threads|
|
threads = ActiveSupport::Dependencies.interlock.raw_state do |raw_threads|
|
||||||
# The Interlock itself comes to a complete halt as long as this block
|
# The Interlock itself comes to a complete halt as long as this block
|
||||||
# is executing. That gives us a more consistent picture of everything,
|
# is executing. That gives us a more consistent picture of everything,
|
||||||
# but creates a pretty strong Observer Effect.
|
# but creates a pretty strong Observer Effect.
|
||||||
|
@ -53,12 +53,12 @@ module ActionDispatch
|
||||||
# strictly diagnostic tool (to be used when something has gone wrong),
|
# strictly diagnostic tool (to be used when something has gone wrong),
|
||||||
# and not for any sort of general monitoring.
|
# and not for any sort of general monitoring.
|
||||||
|
|
||||||
threads.each.with_index do |(thread, info), idx|
|
raw_threads.each.with_index do |(thread, info), idx|
|
||||||
info[:index] = idx
|
info[:index] = idx
|
||||||
info[:backtrace] = thread.backtrace
|
info[:backtrace] = thread.backtrace
|
||||||
end
|
end
|
||||||
|
|
||||||
threads
|
raw_threads
|
||||||
end
|
end
|
||||||
|
|
||||||
str = threads.map do |thread, info|
|
str = threads.map do |thread, info|
|
||||||
|
|
Loading…
Reference in a new issue