From 02ab2b37d7fdd823cf3aaac66052437dde36daa3 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 16 Aug 2010 23:59:18 -0400 Subject: Statement nodes deep-copy AST nodes --- lib/arel/nodes/select_statement.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/arel/nodes/select_statement.rb') diff --git a/lib/arel/nodes/select_statement.rb b/lib/arel/nodes/select_statement.rb index 122f6275fe..50fef776f6 100644 --- a/lib/arel/nodes/select_statement.rb +++ b/lib/arel/nodes/select_statement.rb @@ -8,6 +8,11 @@ module Arel @cores = cores @limit = nil end + + def initialize_copy other + super + @cores = @cores.map { |o| o.clone } + end end end end -- cgit v1.2.3