From: dblack@... Date: 2006-03-04T00:19:57+09:00 Subject: Re: Array comparison returning nil Hi -- On Fri, 3 Mar 2006, Julian Gall wrote: > It seems <=> is not much use if it can't be relied on to do what it > says. > > I now need to compare my arrays with: > > original_item_ids.sort.join('-') == new_item_ids.sort.join('-') > > Which is messy. Can you show an example of two arrays with the same elements that give you nil when sorted and compared with <=> ? David -- David A. Black (dblack@wobblini.net) Ruby Power and Light (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black