aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-04-08 21:38:19 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-04-08 21:38:19 -0700
commit5d403e45858956e89d323e44ab7b413f80f5171f (patch)
tree305bca63fec46189fb8ef876cad2f5bb4b53bb8c /lib
parentbf791073972a179e6d79c8e2f89536734e315f54 (diff)
downloadrails-5d403e45858956e89d323e44ab7b413f80f5171f.tar.gz
rails-5d403e45858956e89d323e44ab7b413f80f5171f.tar.bz2
rails-5d403e45858956e89d323e44ab7b413f80f5171f.zip
fixing BINARY tests
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/visitors/mysql.rb5
-rw-r--r--lib/arel/visitors/to_sql.rb4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/arel/visitors/mysql.rb b/lib/arel/visitors/mysql.rb
index cf590598e1..92348ca7e3 100644
--- a/lib/arel/visitors/mysql.rb
+++ b/lib/arel/visitors/mysql.rb
@@ -30,8 +30,9 @@ module Arel
end
end
- def visit_Arel_Nodes_Bin o
- "BINARY #{visit o.expr}"
+ def visit_Arel_Nodes_Bin o, collector
+ collector << "BINARY "
+ visit o.expr, collector
end
###
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 9ec926a66e..cba289c35c 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -274,8 +274,8 @@ module Arel
collector
end
- def visit_Arel_Nodes_Bin o
- visit o.expr
+ def visit_Arel_Nodes_Bin o, collector
+ visit o.expr, collector
end
def visit_Arel_Nodes_Distinct o, collector