Permalink
Browse files

Replace global Hash with TS::Cache.

  • Loading branch information...
thedarkone committed Aug 7, 2013
1 parent fa91546 commit 2dea0dd099302de640aac28349569c002131c612
Showing with 4 additions and 1 deletion.
  1. +4 −1 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}"
}

0 comments on commit 2dea0dd

Please sign in to comment.