Sha256: 7393f3ebfdb4b9b27ffcfd225b54e0d9f9c19057e38d6abc4560e51bbb4436ba
Contents?: true
Size: 757 Bytes
Versions: 35
Compression:
Stored size: 757 Bytes
Contents
# The purpose of this file is to make equality use method calls in as # many Ruby implementations as possible. If method calls are used, # then equality operations using dataflow variaables becomes seemless # I realize overriding core classes is a pretty nasty hack, but if you # have a better idea that also passes the equality_specs then I'm all # ears. Please run the rubyspec before committing changes to this file. class Object def ==(other) object_id == other.object_id end end class Symbol def ==(other) object_id == other.object_id end end class Regexp def ==(other) other.is_a?(Regexp) && casefold? == other.casefold? && kcode == other.kcode && options == other.options && source == other.source end end
Version data entries
35 entries across 35 versions & 3 rubygems