aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-08-28 10:59:35 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-08-28 21:48:10 +0900
commitfe4753fac87317180c1dadfa07112bbe9f72aaf5 (patch)
tree74f893826bdad725a7ae05a85cba66e846087f15 /actionpack/lib
parent8536ebeefad411ffd1b476c6b499aaec84efea80 (diff)
downloadrails-fe4753fac87317180c1dadfa07112bbe9f72aaf5.tar.gz
rails-fe4753fac87317180c1dadfa07112bbe9f72aaf5.tar.bz2
rails-fe4753fac87317180c1dadfa07112bbe9f72aaf5.zip
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 ```
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_locks.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_locks.rb b/actionpack/lib/action_dispatch/middleware/debug_locks.rb
index 541fb25b6c..03760438f7 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_locks.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_locks.rb
@@ -43,7 +43,7 @@ module ActionDispatch
private
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
# is executing. That gives us a more consistent picture of everything,
# but creates a pretty strong Observer Effect.
@@ -53,12 +53,12 @@ module ActionDispatch
# strictly diagnostic tool (to be used when something has gone wrong),
# 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[:backtrace] = thread.backtrace
end
- threads
+ raw_threads
end
str = threads.map do |thread, info|