diff options
Diffstat (limited to 'lib/arel/nodes/binary.rb')
-rw-r--r-- | lib/arel/nodes/binary.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/arel/nodes/binary.rb b/lib/arel/nodes/binary.rb index cfa75909c5..0d02554199 100644 --- a/lib/arel/nodes/binary.rb +++ b/lib/arel/nodes/binary.rb @@ -7,6 +7,30 @@ module Arel @left = left @right = right end + + def initialize_copy other + super + @left = @left.clone if @left + @right = @right.clone if @right + end + end + + %w{ + As + Assignment + Between + DoesNotMatch + GreaterThan + GreaterThanOrEqual + Join + LessThan + LessThanOrEqual + Matches + NotEqual + NotIn + Or + }.each do |name| + const_set name, Class.new(Binary) end end end |