diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/visitors/visitor.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/arel/visitors/visitor.rb b/lib/arel/visitors/visitor.rb index 8cea42028e..055acf9765 100644 --- a/lib/arel/visitors/visitor.rb +++ b/lib/arel/visitors/visitor.rb @@ -18,6 +18,7 @@ module Arel superklass = object.class.ancestors.find { |klass| respond_to?(DISPATCH[klass], true) } + raise(TypeError, "Cannot visit #{object.class}") unless superklass DISPATCH[object.class] = DISPATCH[superklass] retry end |