Permalink
Browse files

Replace global Hash with TS::Cache.

Conflicts:
	actionpack/lib/action_dispatch/journey/visitors.rb
  • Loading branch information...
thedarkone authored and rafaelfranca committed Aug 7, 2013
1 parent 0a48cce commit cf53a3247a42a46b0df9bf5807b9ab9d200baec2
Showing with 5 additions and 2 deletions.
  1. +5 −2 actionpack/lib/action_dispatch/journey/visitors.rb
@@ -1,10 +1,13 @@
# encoding: utf-8
+
+require 'thread_safe'
+
module ActionDispatch
module Journey # :nodoc:
module Visitors # :nodoc:
class Visitor # :nodoc:
- DISPATCH_CACHE = Hash.new { |h,k|
- h[k] = "visit_#{k}"
+ DISPATCH_CACHE = ThreadSafe::Cache.new { |h,k|
+ h[k] = :"visit_#{k}"
}
def accept(node)

0 comments on commit cf53a32

Please sign in to comment.