From: "Hal E. Fulton" Date: 2002-11-20T13:44:24+09:00 Subject: Re: Defining <=> ----- Original Message ----- From: "Yukihiro Matsumoto" To: "ruby-talk ML" Sent: Tuesday, November 19, 2002 10:34 PM Subject: Re: Defining <=> > Hi, > > In message "Re: Defining <=>" > on 02/11/20, "Gavin Sinclair" writes: > > |> Return nil. > > |If you return nil, then future operations like < and sort will raise the > |following error (1.6.5 Cygwin): > | > | TypeError: no implicit conversion from nil > | > |This is a bit cryptic. Is there any benefit to *not* just raising a TypeError > |yourself (with a more relevant message) in the definition of <=> ? > > This is a formal way in 1.7. I should modify 1.6.8 as well to handle > nil value. matz.clone dev.faster? # true