1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Replace global Hash with TS::Cache.

This commit is contained in:
thedarkone 2013-08-07 20:13:11 +02:00
parent fa915461bc
commit 2dea0dd099

View file

@ -1,9 +1,12 @@
# encoding: utf-8 # encoding: utf-8
require 'thread_safe'
module ActionDispatch module ActionDispatch
module Journey # :nodoc: module Journey # :nodoc:
module Visitors # :nodoc: module Visitors # :nodoc:
class Visitor # :nodoc: class Visitor # :nodoc:
DISPATCH_CACHE = Hash.new { |h,k| DISPATCH_CACHE = ThreadSafe::Cache.new { |h,k|
h[k] = :"visit_#{k}" h[k] = :"visit_#{k}"
} }