From: Rob Biedenharn Date: 2007-06-29T00:04:38+09:00 Subject: Re: Array Problem, sort Array On Jun 28, 2007, at 9:53 AM, John Joyce wrote: > On Jun 28, 2007, at 2:41 AM, Pe�a, Botp wrote: >> From: Phrogz [mailto:gavin@refinery.com] : >> # On Jun 27, 10:17 pm, Pe�a, Botp wrote: >> # > irb(main):013:0> [nil].sort >> # > => [nil] >> >> it gives the impression that nil elements are sortable. > Let's do some philosophy! > But if an array has only one element and the element is nil, is it > really an array? > It is an object of Class Array. > Well, it must be an array. This thread continues to remind me of a comment made by a colleague in about 1988: "When searching the linked-list, the algorithm stops at the first match unless the list has only one element and then it goes to the end whether or not a match is found." -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com