Hello I have found following statement in date.rb: def <=> (other) case other when Numeric; return @ajd <=> other when Date; return @ajd <=> other.ajd end raise TypeError, 'expected numeric or date' end So I can't compare a date with nil, because I get an error. Instead I have to write something like date.instance_of? NilClass, which is something unnecessary complicated. Why is this implemented this way? -- Marek Janukowicz