Sha256: 01270a2f83ee4d4bb27b830dc5b4658b75c6b6da7e2672edd3700cccb682a9b1

Contents?: true

Size: 235 Bytes

Versions: 3

Compression:

Stored size: 235 Bytes

Contents

module Antlr4::Runtime

  class ObjectEqualityComparator
    include Singleton

    def hash(obj)
      return 0 if obj.nil?

      obj.hash
    end

    def equals(a, b)
      return b.nil? if a.nil?

      a.eql?(b)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
antlr4-runtime-0.2.1 lib/antlr4/runtime/object_equality_comparator.rb
antlr4-runtime-0.2.0 lib/antlr4/runtime/object_equality_comparator.rb
antlr4-runtime-0.1.0 lib/antlr4/runtime/object_equality_comparator.rb