On Sun, 11 Jul 2004 16:10:34 +0900,
Hal Fulton <hal9000 / hypermetrics.com> wrote:
> Example:
> [1,2,3,4,6,7,8,11,12,15,16,17] ==> [1..4,6..8,11,12,15..17]
> How would *you* do this?

http://rjp.frottage.org/create_runs.txt

(uses only bash, not ruby, doesn't do any sorting at all, 
 copes with numbers from -1B to +1B)

Probably not ideal for your ruby program, though.