On Sat, Aug 03, 2002 at 02:17:19AM +0900, Charles Hixson wrote:
> Sounds like a tree is what you are really after.  Or a hash that has 
> lists as members.

Or an array of pairs (which can be generated from a hash, if necessary)

  irb(main):001:0> x = { 1=>2, 2=>3, 3=>4 }
  {1=>2, 2=>3, 3=>4}
  irb(main):002:0> y = x.sort
  [[1, 2], [2, 3], [3, 4]]
  irb(main):003:0> y.assoc(2)
  [2, 3]

Paul