From: Jim Burgess Date: 2010-11-30T18:24:44+09:00 Subject: Re: Help sorting an array Hi, First of all, thank you very much for the replies. In the mean time I have managed to hack together a small function to do what I want, but it is too embarrassingly bad to post here and I used one of the other proposed solutions instead. I agree that a different data structure would be much less cumbersome, but I wouldn't know which. What I'm doing is parsing a html document (a calendar) into an array, and using that array to create widgets in a FXRuby GUI. The month names serve as the title of a label and out of the Event objects I then create the appropriate text fields, labels and group boxes for each event. As a month can have multiple events I found it easier to do it this way, as otherwise I would have to find some way of ordering events to month names, which at first glance seemed pretty complicated. If anyone has any suggestions of a better way to approach this problem, I would be very glad to hear them. Thanks for your help so far. -- Posted via http://www.ruby-forum.com/.