From b57a11cb8abfca345f63084ce841c6f412c1156e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 22 Sep 2014 11:01:03 -0700 Subject: move the dispatch table to be per-instance visitors are not shared among threads, so any mutations to the cache should be OK. The cache is also pre-populated on construction, but we should pull that out so we can share the cache among visitors in the future. --- test/visitors/test_bind_visitor.rb | 6 ------ test/visitors/test_to_sql.rb | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'test/visitors') diff --git a/test/visitors/test_bind_visitor.rb b/test/visitors/test_bind_visitor.rb index 5171bbe57c..333636ed51 100644 --- a/test/visitors/test_bind_visitor.rb +++ b/test/visitors/test_bind_visitor.rb @@ -35,9 +35,6 @@ module Arel def test_visitor_yields_on_binds visitor = Class.new(Arel::Visitors::ToSql) { - def initialize omg - end - include Arel::Visitors::BindVisitor }.new nil @@ -49,9 +46,6 @@ module Arel def test_visitor_only_yields_on_binds visitor = Class.new(Arel::Visitors::ToSql) { - def initialize omg - end - include Arel::Visitors::BindVisitor }.new(nil) diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index b495c4d994..195566902b 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -29,7 +29,7 @@ module Arel end def dispatch - { Arel::Table => 'hello' } + { Arel::Table.name => 'hello' } end }.new -- cgit v1.2.3