From: Bill Kelly Date: 2002-08-06T11:41:48+09:00 Subject: Re: Coding challenge (on Ruby Garden) From: "David Alan Black" > Hi -- > > On Tue, 6 Aug 2002, Bill Kelly wrote: > > > > > Hmm, what about > > > > items = [ 2,2 ] > > rows = [ [1,2], [2,3] ] > > I'm not sure whether you mean as a unit test, or just whether it > should work. Well, to cover both: it should work, and you can add > it as a test to the wiki if you want. Ah, OK thanks. I'd noticed no existing unit tests had had duplicate numbers/objects in the 'items' list.... and an implementation I was considering, I realized relied on that... :) ... BTW also I'm noticing the objects in the unit tests are all Enumerable. Can we depend on the objects in the arrays being "sortable", or just testable for equality? Thanks, Bill