any of you knuth fans know some slick (read: fast) way to do this

   a = [ 1, 2, 3, 6, 7, 8 ,9, 42 ]

   a.ranges #=> [ (1..3), (6..9), (42..42) ]

or am i doomed to O(n)?

cheers.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| My religion is very simple.  My religion is kindness.
| --Tenzin Gyatso
===============================================================================