Gavin Sinclair <gsinclair / soyabean.com.au> wrote:
 
> Actually, I fancy
> 
>  def <=>(other)
>    [self.freq, self.time] <=> [other.freq, other.time]
>  end
> 
> I don't know if it works, but I fancy it.  Given what I know about
> Ruby, I'd be surprised if it *didn't* work.

So it does! Nice one. One could even imagine something analogous to 

class Broadcast
  cmp_by :freq, :time

which generates the <=> method, though we'd need to think up some nice
syntax for reversing fields.

martin