class Antlr4::Runtime::ObjectEqualityComparator

Public Instance Methods

compare(a, b) click to toggle source
# File lib/antlr4/runtime/object_equality_comparator.rb, line 12
def compare(a, b)
  return 1 if a.nil? || b.nil?

  a <=> b
end
hash(obj) click to toggle source
# File lib/antlr4/runtime/object_equality_comparator.rb, line 6
def hash(obj)
  return 0 if obj.nil?

  obj.hash
end