aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/node.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-06-15 22:17:20 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-06-15 23:20:16 +0900
commitfc38ff6e4417295c870f419f7c164ab5a7dbc4a5 (patch)
treeb3c24f763b5f59412c07c2360680e0eb3f00f71c /activerecord/lib/arel/nodes/node.rb
parentb388061947c087d0635619d7f0b3a2b1cc91a806 (diff)
downloadrails-fc38ff6e4417295c870f419f7c164ab5a7dbc4a5.tar.gz
rails-fc38ff6e4417295c870f419f7c164ab5a7dbc4a5.tar.bz2
rails-fc38ff6e4417295c870f419f7c164ab5a7dbc4a5.zip
Remove unused `DepthFirst` visitor
We only use `ToSQL` visitors in the our codebase, do not use `DepthFirst` and `Dot` visitors. The `DepthFirst` visitor (which was introduced at c86c37e5f) is used to traverse an Arel (partial) ast with depth first. Is there any worth to keep that undocumented feature with much code and test cases. This removes that unused `DepthFirst` code and test cases.
Diffstat (limited to 'activerecord/lib/arel/nodes/node.rb')
-rw-r--r--activerecord/lib/arel/nodes/node.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/arel/nodes/node.rb b/activerecord/lib/arel/nodes/node.rb
index 8086102bde..0416ff58de 100644
--- a/activerecord/lib/arel/nodes/node.rb
+++ b/activerecord/lib/arel/nodes/node.rb
@@ -6,7 +6,6 @@ module Arel # :nodoc: all
# Abstract base class for all AST nodes
class Node
include Arel::FactoryMethods
- include Enumerable
###
# Factory method to create a Nodes::Not node that has the recipient of
@@ -38,13 +37,6 @@ module Arel # :nodoc: all
collector = engine.connection.visitor.accept self, collector
collector.value
end
-
- # Iterate through AST, nodes will be yielded depth-first
- def each(&block)
- return enum_for(:each) unless block_given?
-
- ::Arel::Visitors::DepthFirst.new(block).accept self
- end
end
end
end