From: "Peña, Botp" Date: 2007-06-29T10:07:37+09:00 Subject: Re: Array Problem, sort Array From: John Joyce [mailto:dangerwillrobinsondanger@gmail.com] : # 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: # > # > A little digression for everyone though... # > # > irb(main):013:0> [nil].sort # > # > => [nil] # > # > is that intended? # > # ...why wouldn't it be? Sorting an array of any 1 element should # > always # > # return a similar array. # > 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. Yes, Joyce, that is the point. simple as it is. if [nil].sort is an array, (indeed it is) isn't [nil,nil].sort an array, too? kind regards -botp