Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #112 from benedikt/master

Adds visit_Arel_Nodes_InfixOperation to Arel::Visitors::DepthFirst
  • Loading branch information...
commit b45466757424b98e1fe9699042d23550fd5b8751 2 parents 660768f + c50b406
Aaron Patterson tenderlove authored
1  lib/arel/visitors/depth_first.rb
View
@@ -70,6 +70,7 @@ def binary o
alias :visit_Arel_Nodes_GreaterThan :binary
alias :visit_Arel_Nodes_GreaterThanOrEqual :binary
alias :visit_Arel_Nodes_In :binary
+ alias :visit_Arel_Nodes_InfixOperation :binary
alias :visit_Arel_Nodes_JoinSource :binary
alias :visit_Arel_Nodes_InnerJoin :binary
alias :visit_Arel_Nodes_LessThan :binary
6 test/visitors/test_depth_first.rb
View
@@ -114,6 +114,12 @@ def test_outer_join
end
end
+ def test_Arel_Nodes_InfixOperation
+ binary = Arel::Nodes::InfixOperation.new(:o, :a, :b)
+ @visitor.accept binary
+ assert_equal [:a, :b, binary], @collector.calls
+ end
+
# N-ary
[
Arel::Nodes::And,
Please sign in to comment.
Something went wrong with that request. Please try again.