On 06/26/2014 05:39 PM, Ryan Davis wrote:
>
> On Jun 26, 2014, at 17:28, Joel VanderWerf <joelvanderwerf / gmail.com> wrote:
...
>> class PointOnTimeline
>>   def initialize time
>>     @t0 = time # might be Time or something else
>>   end
>>
>>   def do_something_with_other_time time
>>     time < @t0 # fail fast if time and @t0 are not comparable
>>     return "something"
>>   end
>> end
...
>
>    assert(time <=> @t0)

That's not bad at all. Spaceship returns truthy, unless incomparable, 
and this will work for any Comparable.