diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/tree_manager.rb | 4 | ||||
-rw-r--r-- | lib/arel/visitors/dot.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/arel/tree_manager.rb b/lib/arel/tree_manager.rb index 87887800d0..8bff97af78 100644 --- a/lib/arel/tree_manager.rb +++ b/lib/arel/tree_manager.rb @@ -15,7 +15,9 @@ module Arel end def to_dot - Visitors::Dot.new.accept @ast + collector = Arel::Collectors::PlainString.new + collector = Visitors::Dot.new.accept @ast, collector + collector.value end def visitor diff --git a/lib/arel/visitors/dot.rb b/lib/arel/visitors/dot.rb index ba35223ac9..d96cf7a6a0 100644 --- a/lib/arel/visitors/dot.rb +++ b/lib/arel/visitors/dot.rb @@ -22,9 +22,9 @@ module Arel @seen = {} end - def accept object + def accept object, collector visit object - to_dot + collector << to_dot end private |