From: Eric Hodel Date: 2005-11-09T06:04:12+09:00 Subject: Re: Numeric <=> On Nov 8, 2005, at 12:52 PM, ChrisH wrote: > Just looking at the docs on ruby-doc.org and noticed that Numeric > implements <=> so it returns 0 or nil. It also includes Comparable, > which depends on <=> returning -1, 0 or 1. Any one know why > Numeric doesn't provide all three expected values? Numeric is an abstract class. Fixnum, Bignum, Float, BigDecimal, etc need to override #<=> appropriately. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04