From: Robert Dober Date: 2009-06-20T21:41:23+09:00 Subject: Re: need a hash/iteration tutorial...text reading. On Sat, Jun 20, 2009 at 2:28 PM, David A. Black wrote: > >  This message is in MIME format.  The first part should be readable text, >  while the remaining parts are likely unreadable without MIME-aware tools. Ooops, that was yet another mistake, thx for telling me David. >> IIRC the insertion order is maintained correctly for literals and Hash[] >> thus >> Hash[ * a_hash.sort_by{ whatever } ] >> should do the trick. > > You'd want to throw in a flatten(1) to unwrap the inner arrays: > >  [*hash.sort_by {...}.flatten(1)] well spotted. R.