Subject: nuby question: sorting with nils
From: "larry" <ljw1001 gmail.com>
Date: Thu, 9 Mar 2006 23:48:42 +0900
if i make an object sortable using <=> as so:
def <=> anItem
@date <=> anItem.date
end
and date is nil, it fails. What's the right way to handle nils in this
scenario?
thanks.