2011/7/1 Rob Biedenharn <Rob / agileconsultingllc.com>:
> Actually, there's a method to help with exactly this sort of thing (pun
> intended).
>
> def <=>(o)
> (a <=> o.a).nonzero? || b <=> o.b
> end
>
> Take a look at Numeric#nonzero? and you'll find an example that's almost
> exactly this.

Very cool :)

-- 
Iaki Baz Castillo
<ibc / aliax.net>