--fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Robert Klemme: > You can either do > x.sort_by {|let,dig| [dig, let]} > or, if you don't want to create all those temporary arrays > x.sort {|(la,da),(lb,db)| da == db ? la <=> lb : da <=> db} > x.sort {|(la,da),(lb,db)| c = da <=> db; c == 0 ? la <=> lb : c} Or use #nonzero? and #<=> chaining like this: x.sort { |(la, da), (lb, db)| (da <=> db).nonzero? or la <=> lb } Piotr Szotkowski -- Language designers in general: You are IN THE WAY. Go here: http://rebol.com/oneliners.html then do us all a favor and don”Ēt resist the urge to fall on that wakizashi when your shame overcomes you. [Jeff Bone] --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzXwkkACgkQi/mCfdEo8UqVBwCdGwezBNjOhAEgtBm3DCPjiUYp UVwAnj7MjDa9Ozlwf4O8eulyhcF6l8pE G5 -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--