diff options
author | thedarkone <thedarkone2@gmail.com> | 2013-08-07 20:13:11 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2013-09-28 19:19:07 +0200 |
commit | 2dea0dd099302de640aac28349569c002131c612 (patch) | |
tree | 93eda7344bfa9d70412105c7beab959753fe33c6 /actionpack/lib | |
parent | fa915461bc4892b8d53d3d4e202ba16f0dbdfe12 (diff) | |
download | rails-2dea0dd099302de640aac28349569c002131c612.tar.gz rails-2dea0dd099302de640aac28349569c002131c612.tar.bz2 rails-2dea0dd099302de640aac28349569c002131c612.zip |
Replace global Hash with TS::Cache.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/visitors.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/visitors.rb b/actionpack/lib/action_dispatch/journey/visitors.rb index a5b4679fae..9e66cab052 100644 --- a/actionpack/lib/action_dispatch/journey/visitors.rb +++ b/actionpack/lib/action_dispatch/journey/visitors.rb @@ -1,9 +1,12 @@ # encoding: utf-8 + +require 'thread_safe' + module ActionDispatch module Journey # :nodoc: module Visitors # :nodoc: class Visitor # :nodoc: - DISPATCH_CACHE = Hash.new { |h,k| + DISPATCH_CACHE = ThreadSafe::Cache.new { |h,k| h[k] = :"visit_#{k}" } |