[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#941398: ITP: ruby-equatable -- Ruby module that adds explicit indications of whether objects can be compared in equality checks



Package: wnpp
Severity: wishlist
Owner: Gabriel Filion <gabster@lelutin.ca>

* Package name    : ruby-equatable
  Version         : 0.6.1
  Upstream Author : Piotr Murach <pmurach@gmail.com>
* URL             : https://github.com/piotrmurach/equatable
* License         : expat
  Programming Lang: Ruby
  Description     : Ruby module that adds explicit indications of whether objects can be compared in equality checks

Equatable extends Ruby objects with 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.


This package is a requirement of ruby-pastel, which if we move further up the
requirements tree, is needed in order to be able to package
puppet-development-kit.

I plan to maintain this package with the ruby team. I will ask for sponsorship
from within this team so that I'm sure that my package will respect the team's
policies.


Reply to: