aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/binary.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/nodes/binary.rb')
-rw-r--r--activerecord/lib/arel/nodes/binary.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/arel/nodes/binary.rb b/activerecord/lib/arel/nodes/binary.rb
index a86d4e4696..e6a5cb63df 100644
--- a/activerecord/lib/arel/nodes/binary.rb
+++ b/activerecord/lib/arel/nodes/binary.rb
@@ -1,16 +1,17 @@
# frozen_string_literal: true
+
module Arel
module Nodes
class Binary < Arel::Nodes::NodeExpression
attr_accessor :left, :right
- def initialize left, right
+ def initialize(left, right)
super()
@left = left
@right = right
end
- def initialize_copy other
+ def initialize_copy(other)
super
@left = @left.clone if @left
@right = @right.clone if @right
@@ -20,7 +21,7 @@ module Arel
[self.class, @left, @right].hash
end
- def eql? other
+ def eql?(other)
self.class == other.class &&
self.left == other.left &&
self.right == other.right