From: Hugh Sasse Date: 2005-09-14T02:16:37+09:00 Subject: Re: Sets, uniqueness not unique. On Wed, 14 Sep 2005, David A. Black wrote: > Hi -- > > On Wed, 14 Sep 2005, Hugh Sasse wrote: > >> I have been splitting a comma separated values file, and putting >> some of the values into an Student class, simply a collection of strings, >> so that I can build a database table from them: > [...] >> picture, coll_status, full_desc = record.split(/\s*\|\s*/) > > I notice you mentioned comma separation but you're splitting on a > pipe. I don't know if this is related to the problem, but I thought > I'd flag it just in case. Yes, sorry, I was using the generic term for this, to facilitate explaining the concept of what I was doing. The data I get is pipe(|) separated. > > Can you provide a couple of sample lines of data? Not really, this is data about real people, and data protection law means I can't. But I can tell you that the splitting works fine, the selection of fields for the student works correctly, the students don't end up with data from other fields, and the nature of the split command means that we can be sure they are all Strings. Therefore I think it boils down to: How can two collections of strings appear to be the same and yet both of them end up in the Set structure? Whitespace is always white, be it tab or space, so that's one way, but I still think that should look different to == or to eql? > > David > Thank you, Hugh