class Oj::Bag

def eql?(other)

Returns:
  • (Boolean) - true if each variable and value are the same, otherwise false.

Parameters:
  • other (Object) -- Object to compare self to
def eql?(other)
  return false if (other.nil? or self.class != other.class)
  ova = other.instance_variables
  iv = instance_variables
  return false if ova.size != iv.size
  iv.all? { |vid| instance_variable_get(vid) != other.instance_variable_get(vid) }
end