==(other)
click to toggle source
eql?(other)
click to toggle source
def eql? other
self.class == other.class &&
self.left == other.left &&
self.right == other.right
end
hash()
click to toggle source
def hash
[@left, @right].hash
end
initialize_copy(other)
click to toggle source
def initialize_copy other
super
@left = @left.clone if @left
@right = @right.clone if @right
end