./devel/ruby-equatable, Extends equality comparison and inspection methods

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2020Q3, Version: 0.6.1, Package name: ruby26-equatable-0.6.1, Maintainer: pkgsrc-users

Equatable

Allows ruby objects to implement equality comparison and inspection methods.

By including this module, a class indicates that its instances have explicit
general contracts for `hash`, `==` and `eql?` methods. Specifically `eql?`
contract requires that it implements an equivalence relation. By default
each instance of the class is equal only to itself. This is a right
behaviour when you have distinct objects. However, it is the responsibility
of any class to clearly define their equality. Failure to do so may prevent
instances to behave as expected when for instance `Array#uniq` is invoked or
when they are used as `Hash` keys.


Master sites:

SHA1: 98bd73e29193649abf462dc8ed9cfe084e23dab4
RMD160: d242f4682a1e5c781f620ae78d83837046824ca9
Filesize: 10.5 KB

Version history: (Expand)